Skip to main content

Hello All,

 

I’m writing an Event that I want to trigger when a date field goes from having no value to having a value.

Can anyone help with condition syntax I need to use as the below is getting the following error message.

 

 

Hi Sholmes,

 

Please try this condition.

OLD:PLAN_F_DATE =! NEW:PLAN_F_DATE

 

Best Regards,
Oshada


Hi @sholmes,

It looks like there’s a typo in your “not equal” operator. It should be != , not =!.

So from the edit condition dialog, you should select != as the condition and enter % as the value. Looks like you selected = as the condition and entered !% as the value instead by mistake. 

 

 

And I think for your case, rather than using the not equal operator, IS NULL is more accurate. In SQL, blank/empty is not the same as null. So if there if there is no value in the date field, then it is likely to be null rather than blank.

You can find IS NULL as well in the condition drop down.

Hope this helps! 

 


I was about to agree fully with Charith E above.  But I tried to log into a couple of customers to confirm the advice he has given.  I see the IS NULL comparison in Apps 10 event actions.  But I noticed that it is NOT available in Apps 9.  So I’ll partly agree with Charith on this one.

However the IS NULL operator is definitely the way to go with comparisons of this type.  The IS NULL comparison operator was designed for comparisons with NULL values and will respond with the normal TRUE / FALSE values.  Equals or not equals comparison operators will give neither TRUE nor FALSE response when compared to a Null value, fyi.  So do as Charith says and use IS NULL comparison wherever possible if you are working in Apps 10 or above.


IS NULL is fine, this can be used to make sure the previously the date field (OLD:PLAN_F_DATE) does not have a value.

How can we make sure that the new date (NEW:PLAN_F_DATE) has a valid date value using available event action conditions? That’s only when @sholmes wanted to fire the event.

@sholmes if the PLAN_F_DATE will always be a future date, you may use a ‘<’ from the condition dropdown and type SYSDATE in the value column. This will make sure the NEW:PLAN_F_DATE has a valid future date(a new value).

/Shardha


@Oshada Samarasinghe, the below is now the error I get, any other ideas?

 

 

As @Eugene Wager states I’m using Apps9 and therefore I do not have the condition option of IS NULL.

 

Any more ideas you wonderful people?


@Oshada Samarasinghe, the below is now the error I get, any other ideas?

 

 

As @Eugene Wager states I’m using Apps9 and therefore I do not have the condition option of IS NULL.

 

Any more ideas you wonderful people?

Hi @sholmes,

If this is going to run a PL/SQL block then you can leave the ‘Conditions for performing this action’ empty and move the logic into the PL/SQL code?

This will cause the Event Action to evaluate for all records but this does not typically effect performance.

Can you outline the complete business requirement?

Cheers,

Pete


@sholmes 

What is your action type for the event action, e.g. ‘Email’, ‘Execute Online SQL’, etc….?


@pwlm and @Shardha Weeratunga 

 

The aim of the event is to take the original date that the service team gives as planned finish date and enter that into a custom field. This custom field has been set to be insertable and not updateable as we do not want this data overwritten. The aim is to be able to report on how many work orders achieve the original planned finish date as this date will be modified if delays occur so that the business is aware when the WO is most likely to be completed. 

If the best way is to progress with PL/SQL route then so be it, I’ll need to get help on that as I’m not skilled there!

 

Thanks Sarah


Hi @sholmes 

Yes set the event action to Execute Online SQL and adding few lines of PLSQL code is the best approach achieve your requirement.

/Shardha