mTS=mbo.getMboSet("$CURTIMESHEET","VACTIMESHEET","ts_date=:VACATION_START and zzemployeeno=:VACTIMESHEET")
How do I make VACATION_START or TS_DATE is formatted in this statement ?
Can I use the SimpleDateFormat ? using ( from java.text import SimpleDateFormat ) ?
so I want both formatted "dd/MM/yyyy"
Thanks
------------------------------
Mohammad Moula
eSolution
------------------------------
Original Message:
Sent: 05-24-2023 09:26
From: Steven Shull
Subject: Using variables in setWhere n the automation script
You could build a where clause using SqlFormat, call setWhere & reset on the MboSet, etc. but it doesn't make sense to do. Let's assume your child object name is VACTIMESHEET (since that's the name of the relationship and most customers make the relationship match the object name).
I would write this like:
mTS=mbo.getMboSet("$CURTIMESHEET","VACTIMESHEET","ts_date=:VACATION_START and zzemployeeno=:VACTIMESHEET")
The first parameter is a unique name that you want to give to reference the set while it's in memory. The second parameter is the object name that you are going to. If the relationship name doesn't match the object name then you should change this. The third parameter is the relationship of how to get from the current record to the child set. Because you are retrieving the values from the current MBO, we can build a dynamic relationship using bind variables. This properly handles parameterization of the data.
------------------------------
Steven Shull
IBM
Original Message:
Sent: 05-24-2023 06:20
From: Mohammad Moula
Subject: Using variables in setWhere n the automation script
Hello,
mTS = mbo.getMboSet("VACTIMESHEET")
mVacstart = mbo.getDate("VACATION_START")
mEmpno = mbo.getString("ZZEMPLOYEENO")
I need to have setWere statement to search for a record in mTS object using the following conditions:
- TS_DATE = mVacstart
- ZZEMPLOYEENO = mEmpno
any help will be much appreciated
#Administration
#Customizations
#EverythingMaximo
#Integrations
------------------------------
Mohammad Moula
eSolution
------------------------------