Select to view content in your preferred language

HELP! Survey123 Connect @pulldata WHERE clause with concat not working if strings contains inverted comma

1250
10
02-02-2024 11:48 AM
Teresa_Blader
Frequent Contributor

Hi! Trying to pulldata but in my concat WHERE clause - it doesn't work for strings that contain inverted commas >> '. How should I structure the WHERE clause if the string may have an inverted comma in it? Do I still use concat? Or should I be doing something else?

donator_name='Kaylie's Donation Center'  must just be looking for donator_name='Kaylie' so returns nothing. 😭 If I remove ' , then it works.

pulldata("@layer", "getValue","geometry", "https://services7.arcgis.com/tC18nF87RnYBtzwI/ArcGIS/rest/services/Food_Rescue_View/FeatureServer/2", concat("donator_name =" ,"'",${donator_name},"'"))
pulldata("@layer", "getValue","attributes.donator_type", "https://services7.arcgis.com/tC18nF87RnYBtzwI/ArcGIS/rest/services/Food_Rescue_View/FeatureServer/2", concat("donator_name = '" ,${donator_name},"'"))

Teresa_Blader_0-1706902755014.png

 

Teresa Blader
Olmsted County GIS Specialist
0 Kudos
10 Replies
RobynSnookCCB
Regular Contributor

Ever figure this out? I'm running into the same issue and can't seem to get a work around. Thanks

0 Kudos