@Charith Epitawatta Many thanks, done.
@Marcel.Ausan You're right.However, my problem always is to identify the field in ShopOrder on which the event action should be created!
thanks for everyone answered the thread and sorry for the late reaction 😓
The code that you’d be putting into a Script task in your workflow would look something like this. // Create Variable and new date. var expDate = new Date(); // add 30 days. expDate.setDate(expDate.getDate() + 120); // convert it to JSON format and substring to get YYYY-MM-DD. expDate = expDate.toJSON().substring(0,10); // assign to variable and make sure the it's a string. execution.setVariable('ExpirationDate',expDate.toString()); You’d have to create a process enrichment task to create the ‘expiration date’ variable, have the script task with the code about in it, and after that, an update projection task for your entity and pass in the new expiration date along with it’s identifier. Here is how it should look: I hope this helps! Bryan Hr Bryan,Many thanks for your effort. Unfortunately I’m totally newbie to IFS. Can you please explain how to use enrichment workflow? where to add the JavaScript code?
Hankx agian @kvbe In fact I could understand why I need to recreate the field again and why not casting?
@kvbe many thanks for you reply. You are right, I fixed this. The error is gone. Still however not getting my desired result.The first issue is that instead getting the last 3 digits of part_no, I got the last 6 numbers (see the image below). I need to show only last 3 numbers whether they are digits or letters.Please notice that the query was validated on the DB. Furthermore, when the “Part_No” is a string or has letter IFS generates an error even though the cast is done using cast(). The error is below {"error":{"code":"DATABASE_ERROR","message":"Database error occurred. Contact administrator.","details":[{"code":6502,"message":"ORA-06502: PL/SQL: numeric or value error: character to number conversion error"}]}}
here is a screenshot from IFS
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.