Hi All,
Hope you all are doing great in these hard times.
I have a requirement to insert a edited date value into a field on passing through a particular task node.
To achieve this, I have written a Action Launch point automation script and defined it in the workflow. It was working fine to this point. '
code' is the name of the variable defined.
from java.util import Calendar
from java.util import Date
from java.text import SimpleDateFormat
from psdi.server import MXServer
from psdi.mbo import Mbo
cal= Calendar.getInstance()
datetime=SimpleDateFormat().format(Date())
date=datetime.split(' ')[0]
time=datetime.split(' ')[1]
month=date.split('/')[0]
day=date.split('/')[1]
year=date.split('/')[2]
hour=time.split(':')[0]
min=time.split(':')[1]
code='20'+year+'-'+month+'-'+day+'-'+hour+''+min
Sometimes there's gonna be multiple rows in which the value has to be inserted into multiple rows. I was trying to modify the script with While condition but it seems not working for me. The following is the script I was trying
from java.util import Calendar
from java.util import Date
from java.text import SimpleDateFormat
from psdi.server import MXServer
from psdi.mbo import Mbo
cal= Calendar.getInstance()
datetime=SimpleDateFormat().format(Date())
date=datetime.split(' ')[0]
time=datetime.split(' ')[1]
month=date.split('/')[0]
day=date.split('/')[1]
year=date.split('/')[2]
hour=time.split(':')[0]
min=time.split(':')[1]
req=mbo.getMboSet("REQCONITEM")
i=0
records=req.getMbo(i)
while(records is not None):
i=i+1
code='20'+year+'-'+month+'-'+day+'-'+hour+''+min
records=req.getMbo(i)
'REQCONITEM' is the name of the relationship
Any help on this one is appreciated.
#Customizations------------------------------
Harshavardhan Kamepalli
Eidiko System Integrators
------------------------------