I have design a software for the warehouse to print deliver paper for customer.
There is a column is ‘Selected’ ,if this column is 1, my logic will send my power table’s Sales order to a templates then print, like the following code
table=event.source.parent.getComponent('PrintPlan').data
PyData=system.dataset.toPyDataSet(table)
row=len(PyData)
#Detect how many columns my table have
number=0
while number< row:
if PyData[number]['Config']==1:
#check if the selected status is 1
event.source.parent.SalesOrder=PyData[number]['SalesOrder']
#if yes , i will send the SalesOrder to the print label formate
if PyData[number]['PrintPcs']==2:
event.source.Print2PCS(event.source)
elif PyData[number]['PrintPcs']==1:
event.source.Print1PCS(event.source)
#According to the logic print 1 PCS OR 2 PCS
number+=1
#Go to check the next line
The problem is while I click this button. This template will don’t change during the logic work
Can you give some inputs to improve the logic to realize like the following picture when go to the next line, the data can be send to the template during the logic is working