This topic is locked

Filtering by Using Where function in Lookup Wizard - Followed Forum $ Manual Guidance to no avail.

4/27/2023 5:32:47 AM
PHPRunner General questions
C
CWDATA author

I am trying to filter a Lookup by using a Session Variable which I have succesfully assigned in "After LogIn Event" this is demonstrated as I assign it to the Client Box at the foot of the page shown here.
Running the programme in Debug Mode it can be seen that in the Where Clause my session variable is being assigned as "Test Client 1" but is is not filtering through the Lookup Query by "client" and although there is one item in the Lookup Table I am just getting no entries showing in the Item Select
img alt
img alt
.
Any pointers as to where I am going wrong? PHPRunner 10.3,
Many thanks for reading.

K
keithh0427 4/27/2023

Maybe it's just me, but I don't believe the query will ever produce a result. (1=0) will always provide a false with the "and" statement.
((client = 'Test Client 1') and (1=0)) looks like it should always produce a false.

C
CWDATA author 4/27/2023

@keithh0427
I have no idea at all where that "and" statement comes from. That is toatlly baffling me.

admin 4/28/2023

Both WHERE clause and GROUP BY clause do not look correct. These are either coming from your SQL query of this table or from the additional settings of this table like Advanced Security.
Maybe it makes sense to create a new custom view based on this table, use the default SQL query and all the default settings. Then you can use this custom view as a source for this lookup wizard.