07-11-2019, 01:38 AM
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".