Select to view content in your preferred language

Search() Appearance wrong integer filter

489
4
10-08-2023 03:12 AM
OfraAi
by
New Contributor III

I have a survey created using Survey123 connect on ArcGIS Online.

I select city from list in the 'choices' tab, and have to select station, from feature service table, filtered by that city.

The ${CityName} column has a domain value, that is Integer and label as string.

I use autocomplete search:

autocomplete search("STList?url=https://utility.arcgis.com/usrsvcs/servers/xyz/rest/services/Servicename/MapServer/1","matches", "CityCode",${CityName})

I've created the survey a long time a ago and it worked perfect! Few months ago it stopped filtering the list.

When I check the survey in browser and F12, I see that the rest query created contains:

(name IS NOT NULL) AND CityCode = '182'

The column is integer and the filter value is string, so the query fails!

In XLSX the CityName is defined as esriFieldTypeInteger, so does the column CityName in the survey feature service, and in the table feature service for the list.

What causes the survey to create string value, how can I change it.

Thanks for any help

Ofra A

 

0 Kudos
4 Replies
IsmaelChivite
Esri Notable Contributor
0 Kudos
OfraAi
by
New Contributor III

Do you have any idea, and can help me?

@ZhifangWang @ZacharySutherby 

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @OfraAi

Apologies for the delay, I've created internal issues for not sending the integer value as a string. It looks like this issue only impacts map services and does not impact feature services. As a workaround enabling feature access (read-only is fine) on the service will resolve the issue. 

Thank you,
Zach
0 Kudos
OfraAi
by
New Contributor III

Hello Zach,

The survey service is based on feature layer, in order to collect data.

The dynamic data layer is access as feature access, with /1 at the end:

 

url=https://utility.arcgis.com/usrsvcs/servers/xyz/rest/services/Servicename/MapServer/1","matches", "CityCode",${CityName})

I did not understand what you mean

Regards

Ofra

0 Kudos