08-29-2019, 03:52 PM
(This post was last modified: 08-29-2019, 04:37 PM by clarencemartin.)
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.
08-30-2019, 04:07 AM
(This post was last modified: 08-30-2019, 04:24 AM by clarencemartin.)
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.
08-30-2019, 10:02 AM
(This post was last modified: 08-30-2019, 10:04 AM by clarencemartin.)
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.
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.
08-30-2019, 04:23 PM
(This post was last modified: 08-30-2019, 04:40 PM by clarencemartin.)
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.
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?
yes, that was bog bobo on my part. I didn't sync down from the cloud. Sometimes I forget the simple things.