So i have it where when someone fills out a text input - script runs to grab data from table, then writes specific data to tags which are used to display info.
But what I want is the table import button to be done prior to collecting the data. This way I can ensure my table where the data is being grabbed from is up to date.
i am assuming i can do this with a doClick but everytime I add one, it switches me to another window. without the doClick, it does this without actually showing the other windows. code is below.
value = event.source.parent.getComponent('WF Input').text
system.tag.writeToTag('System1/Efficiency/Line_6/WF_Num', value)
system.nav.openWindow("Main Windows/Table Import")
window = system.gui.getWindow("Main Windows/Table Import")
data = window.rootContainer.getComponent("Item Master").data
system.nav.closeWindow("Main Windows/Table Import")
WF = value
for row in range(data.rowCount):
index_row = data.getValueAt(row, 0)
if index_row == WF:
prod_nam = data.getValueAt(row, 1)
bot_size = data.getValueAt(row, 2)
allergen = data.getValueAt(row, 3)
system.tag.writeToTag('System1/Efficiency/Line_6/Product_Name', prod_nam)
system.tag.writeToTag('System1/Efficiency/Line_6/Bottle Size', bot_size)
system.tag.writeToTag('System1/Efficiency/Line_6/ALLERGEN', allergen)