I am trying to populate the choices for two fields in my survey based on a public feature layer in AGOL. I am using the 'autocomplete search()' function in the appearance column. The function returns a blank list instead of the expected values.
The public layer is a table of employee data. (SalaryList) I want to use SalaryList first to fill the options for a couple of name fields on a project tracking form. I read this community post that described the method. I downloaded the referenced sample survey in the Connect app. The sample works as described. However, the function fails when I use SalaryList information.
I tried just copying the sample query (see picture 1 below)
Picture 1
into my form to see if the search function worked generally. I was able to populate my name field with the sample data. When I replaced the sample function parameters--the list became blank again.
I checked which version of Connect I was running, I have 3.16.111. I copied the field names and values directly from SalaryList to rule out typos, still blank. I tried replacing different pieces of the function by creating variables instead. For instance, making a new line in the XLSForm to save the layer address as a note & then referencing that note in the search function. None of the variable replacements worked, I thought that my query exceeded the max record count allowed, so I added a filter column/text for the calendar year. Still nothing. I tried the year filter with and without a 'matches' function in front of it. I also tried another layer to see if SalaryList was the issue, the other layer did not work either. Additionally, I was able to use the other layer in a pulldata "@layer" function successfully, so my issue appears to be with the search function specifically.
See picture 2 below for the full text of the search function I am trying to figure out. I would appreciate any advice.
Picture 2
For further reference, I attached the full XLSForm as well.