KB Article #183118
How to initialize a field to the previous day's date using a Designer rule
Problem
Is it possible to initialize a field in InterPlay to the previous day's date via a Designer rule?
Example:
if(coll.EMETTEUR="AMER") then obj.V_APPLI_D=today()-1
Resolution
To achieve what you need, you could use the addDays method. You can add the following function to a library e.g. LibCommonInteract (full class name: com.axway.ais.rules.functions.DateFunctions):
You need to use a "modify" type rule, put it in a library and then call it in Format/Object type:Event/Function call so that it activates on object initialization.
You can create it as described above, and to use it :
In principle, the same thing could be achieved with a java exit, but in this case, this rule has already been developed and is available in com.axway.ais.rules.functions.DateFunctions.