Can I execute a if statement in Query Database

Hi Team

I have a requirement where I need to generate different update query statements for different tables depending on some conditions in a  process model.
Do we have any feature to implement this? 
I do not want to use a XOR gate and create different nodes from XOR condition as the query statements may be huge.
Or if we can generate the query statement in a Script Task and directly call the query to update the tables in the process model.
We use Appian version 21.1

Thank you!!

  Discussion posts and replies are publicly visible

Parents Reply
  • Hi Stefan,

    My condition would be something similar in the rule expression : 

    if (field 1 ="Test", 

    update table1 set table_col=ac!value where primarykey=ac!key,

    if (field 1 ="Test1",

    update table2 set table_col=ac!value where primarykey=ac!key,

    null))

    table1 and table2 are two different tables with different structures.
    We may have more columns in set values and where clause

Children