• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Putting specific keys into the text of a option menu
#12
(02-10-2020, 06:26 PM)efrain.c Wrote: Hi sid,

The keys of the output array are recordIDs of the records. When you say "the keys of tBranchData", there is only one record in the table so there is only one recordID in the keys of tBranchData. Because of this, tBranchData[the keys of tBranchData] evaluates correctly. However, when you say "the keys of tTaxTypes", there are multiple records in the table so there will be multiple keys in tTaxTypes. Because of this, tTaxTypes[the keys of tTaxTypes] will not evaluate correctly.

The following is one way of creating the list you want:

Code:
repeat for each key xRecordID in tTaxTypes
  put tTaxTypes[xRecordID]["taxTypes"] & lf after tTaxTypesList
end repeat
delete char -1 of tTaxTypesList

set the text of button "taxType" of me to tTaxTypesList

For people who have a query with more than 1 rule, modify above to:

Code:
repeat for each key xRecordID in tDeptData[tTableID][1]
     put tDeptData[tTableID][1][xRecordID]["deptCode"] && " - " && tDeptData[tTableID][1][xRecordID]["departmentName"]  & lf after tDeptDataList
  end repeat
 
  Reply


Messages In This Thread
RE: Putting specific keys into the text of a option menu - by sid - 06-19-2020, 04:32 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)