09-11-2020, 10:59 PM
you have an option to add to the script for utilizing Local only data.
for a stand alone Application. This code can be remarked out to provide an option for using Local data or cloud. You use whichever code you need.
--on openCard
--local tStatusA
-
-- get cdb_auth("user@default.com", "password", "user")
--if not cdb_result() then
-- answer "There was a problem authorizing user: " & cdb_result("response")
-- else
-- put cdb_authStatus() into tStatusA
--if tStatusA["local"] is true then
-- cdb_loadTable
-- #Your user can now use the app offline
-- #Now you can go to the next card or show the UI after the login is successful
-- else
-- #You shouldn't fall into this case but I like having it for sanity check
-- answer "You do not have access to the app offline."
--end if
--end if
-- end openCard
thanks efrain for provicing this code.
for a stand alone Application. This code can be remarked out to provide an option for using Local data or cloud. You use whichever code you need.
--on openCard
--local tStatusA
-
-- get cdb_auth("user@default.com", "password", "user")
--if not cdb_result() then
-- answer "There was a problem authorizing user: " & cdb_result("response")
-- else
-- put cdb_authStatus() into tStatusA
--if tStatusA["local"] is true then
-- cdb_loadTable
-- #Your user can now use the app offline
-- #Now you can go to the next card or show the UI after the login is successful
-- else
-- #You shouldn't fall into this case but I like having it for sanity check
-- answer "You do not have access to the app offline."
--end if
--end if
-- end openCard
thanks efrain for provicing this code.