I manually put in the items ID in the perspective property editor so they are in there and the label associated with the ids are both popping up for the rows in the schedule.
I have also tried the below code as well I don't know if this helps but it also does not work.
def runAction(self):
emp_num = self.session.custom.JW.employeeNQ.emp_num
transParameters = {"emp_num": emp_num, "status": 'C'}
data = system.db.runNamedQuery ("Select_Jer_JW_TransStaging", transParameters)
pyTrans = system.dataset.toPyDataSet(data)
self.props.scheduledEvents = []
for row in pyTrans:
if row ["trans_type"] == "R":
system.perspective.print("items started")
items = {
"endDate": row["date_last_modified"],
"startDate": row["date_created"],
"itemId": 'work',
"eventId": row ["job"],
"backgroundColor": rgb(116,159,174)
}
system.perspective.print(items)
else:
items = {
"endDate": row["date_last_modified"],
"startDate": row["date_created"],
"itemId": 'InD',
"eventId": row ["job"],
"backgroundColor": rgb(0,128,0)
}
self.props.scheduledEvents.append(items)
it is starting the for loop and going into the if statement but not creating the items array so it won't even print into the console.