IF Statements to filter database results

Can IF statements be used based on database values?

Hi Paul,

Yes, IF statements can be used. So when you create an action, click advanced options and then you will see ā€˜when should this action runā€™, ā€˜sometimes or alwaysā€™. This is Adaloā€™s version of the IF statement.

If you select ā€˜sometimesā€™, this then gives you options to specify when the action is run.

Hope this helps.

Craig

Thank you Craig, Iā€™ve tested this but it does not seem that there is an option to check current records. For instance, I would like to use a form to create a city name, the city name should be created only when the city name is not yet in the database.

Hi @plandman,

For this Iā€™d recommend creating a custom form, i.e. add an input field ā€œCity Nameā€ and ā€œAddā€ button. For this button, you could make an action to be conditional (like @crmorris2 has advised above).
And then you add a city if Count of Cities where name equals input fieldā€™s value, equals to zero.

There is a tutorial Iā€™ve made some time ago on a similar topic:

Best,
Victor.

2 Likes