Skip to main content
Solved

Multiple Conditions in Execute Online SQL type Event Action


Forum|alt.badge.img+1

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

View original
Did this topic help you find an answer to your question?

5 replies

Abdul
Superhero (Partner)
Forum|alt.badge.img+17
  • Superhero (Partner)
  • 402 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+1
  • Author
  • Do Gooder (Customer)
  • 1 reply
  • April 22, 2025

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


Forum|alt.badge.img+10
  • Hero (Customer)
  • 121 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)
  • 225 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)
  • 880 replies
  • April 30, 2025
IFSRUNINNOVAL wrote:

@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 :)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings