I was hoping the Conditions tab’s condition field would ensure nothing is returned if the condition evaluated false. Unfortunately, it’s returning all records when the condition evaluates false.
Keith you have the same exactly condition in the 2 cases?
The only difference in your queries is that in the first example you have set a toggle condition?
On the first case you run the query anyway but if the toggle condition is true THEN the condition is applied and the query gets filtered (false = all the records)
On the other case, you just DON’T run the query at all if the condition is false (false = 0 records)
I’m not able to understand your logic there (its late for me, my brain is out of order…) but I think I have done something similar to filter an order list that i needed…
This switch and the condition is used in order to eliminate the chance of a match in your query.
I assume that the user.Account returns always a value >=0…
If the contains is true then you have usrSwitch=-1 and then the user.Account will not much the condition
You can adjust the switch (numeric, string etc) and the condition (greater / less) to your needs
Just an idea… Maybe you can adjust it to your needs
Hi @franse, I was attempting to use the Condition’s condition to keep a user from being able to perform the database query.
For example, if a User does not have the user_read permission, then do not allow them to run the database query operation. Unfortunately, the condition field on the Condition’s tab does not work like that. It only keeps the condition (AccountUser.Account == UserRoleCheck[0].Account) from being used. The database action will still run just without the condition, so in a database query step it means that all records will be returned.
Well the condition in the filters tab is only user to apply the filter or not.
If you want to conditionally run a database query use the condition step in server connect.