on 04-17-2018 5:23 AM
Hi Integration Experts,
I have a delta sync scenario which I need to use a write variable to keep the last run date time in this format yyyyMMddHHmmss and retrieve it in the next run. In the content modifier I have defined a field ShipDate and it was filled during runtime. I also defined a write variable based on the field I created earlier but the value was not written. Any idea what is wrong?
Best Regards,
Jeremy
Hi Jeremy,
Try displaying/checking the value of ShipDate if it is setting at runtime to the property properly. You can try it giving constant value in property.
Also, In write variable , check the box Global scope if it helps. Here also, you can try with current date and time.
Thanks,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashish
Try displaying/checking the value of ShipDate if it is setting at runtime to the property properly.
>I logged the value of ShipDate and it was passed correctly at runtime.
Also, In write variable , check the box Global scope if it helps. Here also, you can try with current date and time.
>If I use the current date and time then it works. However my requirement is to use the computed date and time based on the response but then the write variable does not work anymore.
Regards,
Jeremy
In that case, try with Xpath expression in write variable.
I used xslt to remove namespace from XML so xpath can be parsed. No need to set in property. For me it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Sure. The iflow looks like this. Content Modifier 9 is the response
In the content modifier 7 I defined the property field "Shipdate"
In the script I update the property field "ShipDate" based on the ship date in the response like this format 201801010000.
Lastly, I write the variable as mentioned earlier above but nothing is written.
Regards,
Jeremy
Hello Jeremy,
Please use below code in the script to check if there any value present in the property.
def map = message.getProperties();
def ShipDate= map.get("ShipDate")
def messageLog = messageLogFactory.getMessageLog(message)
if (messageLog != null) {
messageLog.setStringProperty("ShipDate", ShipDate);
}
thanks and regards,
Praveen T
Hi sriprasadshivaramabhat,
You are always welcomed. 🙂
Thanks,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.