Help! search() function not working as documented

03-08-2023 09:56 AM
New Contributor III

Hey all,

Hoping someone can help troubleshoot why the search() function isn't working as documented for me.


I'm trying to put together a simple search() query for a question that returns attendees but only for a specific event. The attendance list is a child table and I'm aiming to have the search function return attendees based on the parent event point selected. 

Referring to the documentation for search(), the following example was given:

search('csvName', 'matches', 'breed', ${DogQuestion})

I set up a very similar query (though instead of a csv, it was pointing to the related table in the feature layer):

search('table_example?url=<url>/FeatureServer/3', 'matches', 'parentglobalid', ${parentglobalid})

However, this returns the entire attendance list instead of just those that match the parentglobalid . 



The list should only show First1, Last1; First2, Last2; etc. 

When manually entering the parentglobalid of a test event however, it returns the expected results.

search('table_example?url=<url>/FeatureServer/3', 'matches', 'parentglobalid', '57ad118f-bcb0-41a1-8268-c2d2b7f79512')


This returns the proper list of attendees for that example event.

It seems that the search() function wants the searchText parameter to be enclosed in quotes (' ') , however the documentation has it calling a specific field. 

Troubleshooting Attempts

I tried creating a secondary field to contain the parentglobalid as a string (though the original field was a text question type already), having that field calculate to put the parentglobalid in quotes (concat("'", ${parentglobalid}, "'")), and even tried calling a completely different field not related to the searchColumn, but those all returned the entire list. 

Any help would be much appreciated! Hopefully I'm just missing something obvious.

0 Kudos
0 Replies