I have a Grid application. in the search I want to restrict the rows that get loaded into the “search lookup” by another variable (usernumber) but can’t quite figure out how to do it.
In Search/OnInit I have this code
{personid2} = $_SESSION['g_id_user'];
echo {personid2};
This does echo the value of {personid2} which is for example 12.
Now in my Search, Fields, Phone field, I have an automatic lookup for my “select” data type.
select phone
from phones
where personid = {personid2}
When I run my application it doesn’t return any rows in the Phone field. It should list all the phone numbers for just the one person that I am logged into.
Not sure what I’m doing wrong.