We are currently performing maintenance on Appian Community. As a result, discussions posts and replies are temporarily unavailable. We appreciate your patience.

Expression rule to compare two values

I want to write an expression rule to compare two values: 

first value is from rule input and second value from a db table field.If the values are same ,then another field(column) of my db table must be set to inactive or 0.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    FYI, you're able to edit your post if you want to change something, it's not really needed to post essentially the same thing again.

    For your question, you should be able to query from your database table (using a!queryEntity() or, preferably, referencing an existing expression rule you've already set up to handle queries to that table), and compare the result to the input value.  I'm not exactly clear what you mean when you say "another field of my table must be set to inactive", as an expression rule itself cannot change data in a DB table - what you describe will probably be most easily accomplished by using a process model which sets the desired value determined by some initial logic then writes that row back to your table.

Reply
  • 0
    Certified Lead Developer

    FYI, you're able to edit your post if you want to change something, it's not really needed to post essentially the same thing again.

    For your question, you should be able to query from your database table (using a!queryEntity() or, preferably, referencing an existing expression rule you've already set up to handle queries to that table), and compare the result to the input value.  I'm not exactly clear what you mean when you say "another field of my table must be set to inactive", as an expression rule itself cannot change data in a DB table - what you describe will probably be most easily accomplished by using a process model which sets the desired value determined by some initial logic then writes that row back to your table.

Children