LiveCloud Forums
incomplete AdvancedQuery example? - Printable Version

+- LiveCloud Forums (https://forums.livecloud.io)
+-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1)
+--- Forum: Getting Started (https://forums.livecloud.io/forumdisplay.php?fid=4)
+--- Thread: incomplete AdvancedQuery example? (/showthread.php?tid=50)



incomplete AdvancedQuery example? - sltfn - 07-11-2019

Which part of the example query below (on the docs page for AdvancedQuery) ensures that only "record IDs with first name ending with 'n' or 'y' will be included in the line-delimited list"? If, as it appears to me, that portion of the query is missing, could you please supply the full query? Thanks in advance.

Code:
# We want to find all clients that have last name "Smith"
# and a first name that ends with "n" or "y".

local tDataA, tAdvancedMap, tTable, tTarget, tResultFormat

# first query
put "lastName" into tDataA["lName"]["key"]
put "=" into tDataA["lName"]["operator"]
put "Smith" into tDataA["lName"]["value"]

# advanced map
put "LName" into tAdvancedMap

put "clients" into tTable
put "cloud" into tTarget
put "recordList" into tResultFormat

put cdb_advancedQuery(tDataA,tAdvancedMap,tTable,tTarget,tResultFormat)

# outputs: 12345678-abcd-1234-cdef-1234567890ab  
#          87654321-abcd-1234-cdef-1234567890ab

# This is a line delimited list containing all record IDs with last name "Smith"
# and first name ending with "n" or "y".



RE: incomplete AdvancedQuery example? - jasonchan - 07-11-2019

Thank you for bringing this to our attention. We will try to update the doc ASAP.


RE: incomplete AdvancedQuery example? - Linda Lu - 07-11-2019

This example for the advanced query documentation has been updated.