Folks,
Been struggling all day in trying to achieve multiple where clauses to update in a dynamic input with no luck. Any help would be appreciated!
a brief summary of what I am trying to achieve and how:
I have an App that updates a query in the dynamic tool based on input to text boxes.
The customer has 4 different ways (only one option can be selected at a time) of selecting how they would like to filter the report by choosing any of the 4 text boxes
Based on what the customer enters, a different query is run with the relevant WHERE clause.
This is achieved by Updating value with formula and entering an IF statement.
For example, if the customer selects the "Account Number" checkbox and enter 12345
then the query SELECT * FROM TABLE WHERE ACCOUNT NUMBER = 12345 will run.
if the customer selects the "PERS" checkbox and enters 4567 then the query
SELECT * FROM TABLE WHERE PERS = 4567 will run.
For multiple entries within the same textbox, a regex would replace each new line with a comma.
The screenshot explains in detail what I am trying to achieve.
the problem: the IF statement, even though without an error, is returning an output as if there is no where clause at all.
i have tried variations like !ISNULL ISNULL etc and it still does not work.
any help to get this working would be greatly appreciated.