Storage variable query

I'm new to app development, and more familiar with SQL. But, basically, I have a user sign in, and they'll see clients assigned to them. Then they pick a client from that list, and I need to send that client name through a query of all of their clients to pull the last visit. I stored the client name they clicked in a Storage variable, but I can't seem to use that variable in a query to retrieve all of the other fields related to just that client. If I can't use a storage variable, how else can I send the clicked name to another query? Or, I'm not referencing the variable correctly. I'm not sure.
1 person has
this question