Select to view content in your preferred language

Dynamic Search Appearance Results Descending Order

447
2
06-12-2023 06:19 AM
Sharouff
New Contributor II

Hi Folks,

I am suing the search appearance question on a hosted feature layer to pull a list of report numbers for a particular region where the report numbers are sequential by region. I am successfully getting just the list of report numbers based on the user's location region so the last number used can be selected to derive the next report number for the user. However I would like to have this list presented in descending order so the user doesn't have to scroll to the bottom of the list before making a selection (see screen shot below). 

Does anyone have a solution for this? I have played around with the orderByFields in the expression but everything I have tried has either broken it or not sorted in descending order.

 

Sharouff_1-1686575860420.png

 

 

 

0 Kudos
2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @Sharouff

You should be able to use the orderByFields parameter to sort the results descending. Please note a very strange quirk about the search() appearance is because the question mark is used to separate the table name from the URL the ampersand is needed to separate the URL from additional URL parameters. I've attached an example that sorts counties from Z to A using the orderByFields parameter. 

Thank you,
Zach
0 Kudos
SMH-Rio
New Contributor III

This solution only applies to the Field App, correct? In the Web App, the message "Failed to load picklist. Please contact the survey owner to correct it." appears. I tested both the attached xlsx and one I made.

 

SMH_Dados_Agol_0-1700592675994.png

 

0 Kudos