02-08-2020, 07:52 PM
Hi Guys
I'm stuck on something. I want to store a list of options in the livecloud database that i will insert into the text of an option menu , or combo Box Menu control (Basically a dynamic drop down list)
It works fine if there id only one record in the table, for example:
I'm stuck on something. I want to store a list of options in the livecloud database that i will insert into the text of an option menu , or combo Box Menu control (Basically a dynamic drop down list)
It works fine if there id only one record in the table, for example:
Code:
put cdb_read("companySetup","*","local") into tBranchData
//there is only one record in the companySetup table
set the text of button "branchTaxAppliedTo" of me to tBranchData[the keys of tBranchData]["brnCode"] && "-" && tBranchData[the keys of tBranchData]["companyName"]
// this works provided that there is only one record in the table
--I tried to convert the array with return (as per documentation, I also tried return and tab) on the next piece of code that has more than 1 record
put cdb_read("taxTypes","*","local") into tTaxTypes
put tTaxTypes[the keys of tTaxTypes]["taxTypes"] into tTaxTypes2 // there is only one row called taxTypes in the table
combine tTaxTypes2 using return and tab
set the text of button "taxType" of me to tTaxTypes2
I added the combine command in the hope that it will work, but it didnt