Purpose |
Solution
Example
We offer the user the list of damage codes as a table in which he can select several entries by selecting rows. To transfer the selected entries to a string field, we use a separate button below the table. In our example, this only fills a separate variable, which is also displayed as "List of damages". Depending on the application, the value list instead could be transferred to an existing comment field in the transaction.
GuiXT Script:
// new transaction? then read the damage codes from the text file
name="codelist" -readOnly
name="codetable" -rowSelection
InputScript "transfer_codes.txt": // reset list Clear V[codelist]
// row index Set V[k] 0
// build up list field label next_row if V[k<&V[codetable.rowcount]] Set V[k] &V[k] + 1 if V[codetable.stat.rowselection.&V[k]=X] if V[codelist] Set V[codelist] "&V[codelist]," endif
Set V[codelist] "&V[codelist]&V[codetable.code.&V[k]]"
endif
goto next_row
endif
Return InputScript "clear_codes.txt": // clear code selection Clear V[codetable.stat.rowselection.*] Clear V[codelist] Return
|
Components GuiXT + InputAssistant |