Skip to main content

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???

Hi ​@imalkac,

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

 

Regards

Abdul Rehman


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


@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,
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


@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