Search Appearance not pulling data

1686
2
Jump to solution
05-27-2022 08:43 AM
Aguirre_WOG
New Contributor II

OK, so I can't get search to display the data from the source URL -- or from any source for that matter.  The dropdown is empty. Troubleshot this with a colleague who was successful using the same exact XLSForm. Literally, the same form. Seems that the problem may be with my local Survey123 Connect application (?) but I cannot  find the source of the issue.  **Also, I am not experiencing any other issues w/ generating and publishing forms through Connect apart from this one item.***

  • Survey123 Connect 3.14.274 
  • Advanced Template -- attached

Spent too many hours trying to figure this one out -- any help would be greatly appreciated. 

UPDATE* Tried using search with local CSV and was successful.  Problem remains when attempting to use URL. 

UPDATE2* Uninstalled and reinstalled Connect but still no-go. Published a fresh copy of the survey and downloaded to Field App but not able to see values there.  However, I opened the survey in a browser and WAS ABLE TO VIEW THE DROPDOWN VALUES THERE. Unfortunately, I need this running on the Field App. 

UPDATE3* My collage is now seeing unusual behavior with this as well.  Strangely, if we log out of the Field App (both the ArcGIS Online and organizational login) then the proper behavior is seen.  Same with Connect - you have to log out to see it function properly.  

Still looking...

0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @Aguirre_WOG

This issue is logged as BUG-000147248 the issue is the search() appearance automatically sends your current access token when requesting a feature service. This causes the behavior observed because the service you are referencing is located in an ArcGIS Enterprise organization and you are currently authenticated with an ArcGIS Online organization. What happens is when Survey123 sends your ArcGIS Online token to the ArcGIS Enterprise service ArcGIS Enterprise recognizes that the token is not one of it's token and rejects the request as invalid. 

There are a few options to work around the issue: 

- If you are the owner of the ArcGIS Enterprise service either don't share the service publicly, or if you need the service public create a view of the service and don't share that publicly. Then add the service as an item in your ArcGIS Online organization and store credentials for the service. Share that ArcGIS Online service publicly and reference the ArcGIS Online REST endpoint in the search() appearance. 

- If you are not the owner of the ArcGIS Enterprise feature service export the feature service as a file geodatabase and upload the file geodatabase to your ArcGIS Online organization to create a new hosted feature service in ArcGIS Online. Then reference the REST URL for the ArcGIS Online hosted feature service.  

Thank you,
Zach

View solution in original post

2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @Aguirre_WOG

This issue is logged as BUG-000147248 the issue is the search() appearance automatically sends your current access token when requesting a feature service. This causes the behavior observed because the service you are referencing is located in an ArcGIS Enterprise organization and you are currently authenticated with an ArcGIS Online organization. What happens is when Survey123 sends your ArcGIS Online token to the ArcGIS Enterprise service ArcGIS Enterprise recognizes that the token is not one of it's token and rejects the request as invalid. 

There are a few options to work around the issue: 

- If you are the owner of the ArcGIS Enterprise service either don't share the service publicly, or if you need the service public create a view of the service and don't share that publicly. Then add the service as an item in your ArcGIS Online organization and store credentials for the service. Share that ArcGIS Online service publicly and reference the ArcGIS Online REST endpoint in the search() appearance. 

- If you are not the owner of the ArcGIS Enterprise feature service export the feature service as a file geodatabase and upload the file geodatabase to your ArcGIS Online organization to create a new hosted feature service in ArcGIS Online. Then reference the REST URL for the ArcGIS Online hosted feature service.  

Thank you,
Zach
Aguirre_WOG
New Contributor II

Thanks, Zach.  We appreciate you taking the time to give us this update along with the two possible solutions. We're looking into them now.  👍

0 Kudos