Skip to main content
Solved

Multiple Conditions in Execute Online SQL type Event Action

  • April 22, 2025
  • 5 replies
  • 131 views

Forum|alt.badge.img+2
  • Do Gooder (Customer)
  • 5 replies

Dear Heroes,

I want to create an Execute Online SQL type Event Action to a particular table. I want to fire the event when the Rowstate column value equals to “Cancelled or Returned” both. How should I give the Conditions.


I gave this like below. But it’s not working

NEW:ROWSTATE = Cancelled;Returned

how to do this???

Best answer by Abdul

Hi ​@imalkac,

You need to write in the SQL Statement body only. Please refer to the screenshot below.

 

Regards

Abdul Rehman

5 replies

Abdul
Superhero (Partner)
Forum|alt.badge.img+20
  • Superhero (Partner)
  • 545 replies
  • Answer
  • April 22, 2025

Hi ​@imalkac,

You need to write in the SQL Statement body only. Please refer to the screenshot below.

 

Regards

Abdul Rehman


Forum|alt.badge.img+2
  • Author
  • Do Gooder (Customer)
  • 5 replies
  • April 22, 2025

@Abdul Thanks Mr. Abhul. It’s working now.


Forum|alt.badge.img+10
  • Hero (Customer)
  • 122 replies
  • April 30, 2025

@Abdul but that mean that the event is triggered on every status change.

Is there any way to do that differently?

@dsj  any idea maybe?


InfFilipV
Hero (Partner)
Forum|alt.badge.img+12
  • Hero (Partner)
  • 231 replies
  • April 30, 2025

Hi,
you can use “Additional Attributes”

define attribute “IS_ENABLED” with SQL

  • decode(‘&NEW:ROWSTATE’, ‘Cancelled’, ‘TRUE’, ‘Returned’, ‘TRUE’, ‘FALSE’)
  • CASE WHEN ‘&NEW:ROWSTATE’ in (‘Cancelled’,’Returned’) THEN ‘TRUE’ ELSE ‘FALSE’ END

 


BR
Filip


dsj
Ultimate Hero (Partner)
Forum|alt.badge.img+22
  • Ultimate Hero (Partner)
  • 906 replies
  • April 30, 2025

@Abdul but that mean that the event is triggered on every status change.

Is there any way to do that differently?

@dsj  any idea maybe?

 

Hi ​@IFSRUNINNOVAL 

In the event level, it’s only possible to mention the field change as a condition for event trigger, not the field value. Therefore the event will trigger on every status change but the action will only execute based on the condition :)