Can I store a value from a table search in a variable?

May be more difficult for you. But may be easier for others who are asked questions by you.

If you have a variable in Test Case A and you want to pass the value to next Test Case B, then Test Case A can store the value in a GlobalVariable and Test Case B can read it to get the value. Have a look at this post for reference:

Or, WebUI.callTestCase() returns a value from the callee Test Case to the caller Test Case.

It is totally up to you to solve your problem using “a simple table check”. Nobody stops it. Please write code for yourself.

Just I do not understand what you mean by saying “a simple table check”. The code you presented does not explain to me what “a simple table check” is.

All I can do is to read the codes exposed and try to find how to improve them. If the codes are not expressing your intension, any description in natural language what you want to do doesn’t help.