put cdb_list(tTable,tTarget,tKeys) into tOutputA - Printable Version +- LiveCloud Forums (https://forums.livecloud.io) +-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1) +--- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=3) +--- Thread: put cdb_list(tTable,tTarget,tKeys) into tOutputA (/showthread.php?tid=116) |
put cdb_list(tTable,tTarget,tKeys) into tOutputA - clarencemartin - 08-29-2019 I am having trouble using the cdb_list with the target "local" The target "Cloud" works perfectly. code tested: on mouseUp pButtonNumber local tMyVenueList getVenueList1 put tMyVenueList into field "sourceList" end mouseUp command getVenueList1 local tTable, tTarget, tKeys, tOutputA, tMyVenueList --local tMyVenueList cdb_loadTable "venues" put "venues" into tTable put "local" into tTarget put "VenueName" into tKeys put cdb_list (tTable,tTarget,tKeys) into tMyVenueList -- put "Not Assigned" & return before tMyVenueList -- put "All Venues" & return before tMyVenueList --answer gMyVenueList end getVenueList1 I even did a reload of a table to make sure the table was loaded. RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - Linda Lu - 08-30-2019 I have confirmed that cdb_list is working with the target parameter "local." Here are two methods you can try with the code you provided: placing cdb_list into a global variable or changing getVenueList1 to a function and returning cdb_list. 1) Using a global variable Code: global gMyVenueList 2) Changing getVenueList1 to a function Code: on mouseUp pButtonNumber RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - clarencemartin - 08-30-2019 thanks, Linda. I'll give that a try tomorrow. I couldn't wait, so I tried both code snippets. neither worked using the Local parameter. what could I be doing that is wrong? I have other "local" target parameters in other code snippets that work. RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - clarencemartin - 08-30-2019 I did more testing and thank you for the suggestions, BUT: the folwing code works: __________________________________________________________________________________________________________________________________________________________________________________ on mouseUp pButtonNumber -- code local tTable, tTarget, tKeys, tOutputA put "test - venueData" into tTable put "cloud" into tTarget put "venueName" into tKeys put empty into field "sourceList" put cdb_list(tTable,tTarget,tKeys) into field "sourceList" put cdb_result("recent") end mouseUp _________________________________________________________________________________________________________________________________________________________________________________ the following code does not on mouseUp pButtonNumber -- code local tTable, tTarget, tKeys, tOutputA put "test - venueData" into tTable put "local" into tTarget put "venueName" into tKeys put empty into field "sourceList" put cdb_list(tTable,tTarget,tKeys) into field "sourceList" put cdb_result("recent") end mouseUp _________________________________________________________________________________________________________________________________________________________________________________ "This is not Logical" as Mr. Spock would say. The reason that I use the cdb_list command is that it gives me a single key result for my list. I could use a simple cdb_read command but then I have to hide the first column of my list to get a simple list. I am sorry for being such a pain, but the documentatio shows that this could be done. RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - Linda Lu - 08-30-2019 If you can upload a zipped attachment of your code that includes cdb_list not working with "local" as the target, I can take a look a closer look at your issue. RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - clarencemartin - 08-30-2019 I created a Substack from one of my test card. This substack works in my application because all of the tables are available there. It also uses the Cloud as the parameter, so it works. Changing the parameter to local will make it fail. it may be best to use a sharing application such as TEAMS for you to veiw the problem. RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - efrain.c - 08-30-2019 Hi Clarence, I tested cdb_list and I got the expected results. on preOpenCard I call cdb_auth, cdb_loadTable, and cdb_sync (if you don't sync the table down "local" calls won't work). Can you try this and let me know what you get? RE: put cdb_list(tTable,tTarget,tKeys) into tOutputA - clarencemartin - 08-31-2019 yes, that was bog bobo on my part. I didn't sync down from the cloud. Sometimes I forget the simple things. |