Quantcast
Channel: SCN : Discussion List - SAP for Mobile
Viewing all articles
Browse latest Browse all 5806

Comparing two dates using Rules in Syclo Agentry Application (SAP Work Manager)

$
0
0

Hello Experts,

I am trying to compare two dates using Rules under a particular field in SAP WM application.

I am trying to compare a date (coming from SAP ECC, stored under the object property) and the System Date (using Date function).

I couldn't find a direct function to compare dates, nor the GT(greater than) functions works here.

 

I am trying to display a particular image, based on the condition if the duedate has passed already.

 

My rule structure is as follows.

 

1.png

The first parameter to the JavaScript logic block is the "DueDate" property from the workorder object.

 

I am using the System->Date function as follows, this is used as the second parameter to the JavaScript.

 

 

3.png

 

The JavaScript block just compares the dates ( the string can now be compared directly in the MM-DD-YYYY format).

 

2.png

 

Unfortunately, This rule is not working correctly.

 

Can you please suggest what am I missing here?

 

Thanks for the help!

 

Best Regards,

Arihant Kothari


Viewing all articles
Browse latest Browse all 5806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>