02-10-2020, 06:26 PM
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:
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