Open specific survey in Survey123 inbox from ArcGIS Field Maps in editmode

1890
10
04-06-2022 05:15 AM
Niklasg
New Contributor II

Hi community

How can I open a specific survey in ArcGIS Survey123 Inbox in edit mode from a URL in ArcGIS Field Maps?

Right now the link im using in a pop-up looks like this:

https://survey123.arcgis.app/?itemID=dbf5fe641fbc44cb97100a830e850908&folder=inbox&mode=edit&globali...

It does open the correct survey's inbox, however I can't get it to either query the list or open the specific survey based on its globalid, instead I see the full list of survey responses in the inbox.

Thanks,

Niklas

Tags (1)
0 Kudos
10 Replies
Strahanjen
Occasional Contributor II

I'm new to this and am not sure if there are better options, but below is a sample of a link that works for us to filter the surveys in the inbox. I think this works because the inbox content list displays the data I'm using for the filter. There may be other ways to filter. 

I've found that link only works on my apple devices, however. If I try the link on our android tablets, it opens a web page prompting users to download ArcGIS Survey123, even if it is already installed on the device. I'm going to make a separate post to see if I can get a solution that works for Android. 

https://survey123.arcgis.app/?itemID=e9f20ebfe0c6400f999cea512b60832e&action=edit&folder=inbox&updat...

Niklasg
New Contributor II

Hi Strahanjen,

Thanks for the suggestion. It does open the inbox in edit mode and filters through the survey's so I guess this is a valid solution. I tried to do the same and filter the list in the inbox based on the information filled out in one of my questions {Tracks}, however it cannot filter the list. Is this something you have setup within connect?

My URL: https://survey123.arcgis.app/?itemID=dbf5fe641fbc44cb97100a830e850908&action=edit&folder=inbox&updat...}

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi @Niklasg ,

As @Strahanjen indicates, you need to use either a filter parameter (as the link they provided) or a q:<queryparameter> parameter to reduce the number of entries visible in the Inbox to 1.  The difference is that the filter parameter filters the Inbox records on device while the q:<queryparameter> alters the query made to the feature service to load the Inbox.  The update parameter is also often used to trigger a new query request to reload the Inbox.  Please refer to the Survey123 documentation for more information.

It looks like in your response you provided a URL that is supposed to have a placeholder (the {Tracktal} entry in the filter.  Can you confirm that this placeholder is substituted with a real value (i.e., what is the link in the rendered pop-up)?  While this appears to be a relatively simple case for constructing the URL, it is still best to construct it using the UrlEncode Arcade function to catch any special characters in the values of the parameters.

0 Kudos
Niklasg
New Contributor II

Hi James

Thanks for your response. What confused me earlier was that the filter parameter doesn't filter responses in the inbox corresponding to the information in the "instance_name" field within Survey123 connect but shows all records in the inbox with a corresponding information in any of the fields. So in my case I filter the inbox with the ${Tracktal} field which gives a value, but since I have other fields with the same value those records are shown in the inbox as well. There was a request for an enhancement to filter the inbox based only on the field/information given in the "instance_name" setting in connect. Any news on that enhancement?

Worked: I used the query parameter as you suggested, and thanks for that, which works! The inbox queries the records and only show records corresponding to the information in the ${Tracktal} field. However, when I open the URL from Field Maps the inbox shows my latest records and I need to refresh the inbox before it shows the queried records. It is alright, but any suggestion to make it update automatically is welcome.

My URL: https://survey123.arcgis.app/?itemID=dbf5fe641fbc44cb97100a830e850908&action=edit&folder=inbox&updat...}

0 Kudos
JamesTedrick
Esri Esteemed Contributor

@Niklasg- to follow up on the filter parameter, if you wish to search a specific field, use the pattern:

field:<fieldname>:value

In your situation, this would be:

field:Tracktal:{Tracktal}

ahargreaves_FW
Occasional Contributor III

@JamesTedrick  if my inbox is updated I can use the filter successfully as shown below:

arcgis-survey123://?itemID=xxxxxxx&action=edit&folder=inbox&update=true&filter=5xxxxx0

However, as the doc here states the 'q' parameter Queries the feature layer for an existing record. It can be used to retrieve content that is not on the device. So how come the below requires me inbox to still be updated?

arcgis-survey123://?itemID=xxxxxxx&action=edit&folder=inbox&update=true&q:where=WORKORDER_NUMBER=5xxxx0

0 Kudos
SMDSAdministrador
New Contributor III

Hi James. Regarding the filter, I can't get the filter to work on a specific field, even with the pattern in your example

I've tried arcgis-survey123://?itemID=6aae34254266436a96f35c5709cef409&filter=field:name:ABRAAO&folder=inbox and other variations, but I still can't filter the "name" field with the specified text

When using arcgis-survey123://?itemID=6aae34254266436a96f35c5709cef409&filter=ABRAAO&folder=inbox, it works. The problem with this is that if there are other occurrences of "ABRAAO" in other fields, the filter will also be applied.

Is there any way to filter a specific field (other than by "q:<queryparameter>")?

 

SMDSAdministrador_0-1678886640350.png  

SMDSAdministrador_1-1678886749931.png

 

 

0 Kudos
ahargreaves_FW
Occasional Contributor III

Hey @SMDSAdministrador 

I use the below and it works fine on iOS and Android. Note this doesn't appear to work on Windows devices.

arcgis-survey123://?itemID=xxxxxxx&action=edit&folder=inbox&update=true&filter={ATTRIBUTE TO SEARCH FOR}

0 Kudos
SMDSAdministrador
New Contributor III

Hello, @ahargreaves_FW 

Yes, this method I know and I know it works well even on Windows. His problem is that he filters the desired string in the entire database.

For example, in the second image of my previous post, the 3rd line of the inbox has the name = "ICARO", however, there is the string "ABRAAO" in another column of the database (and, therefore, the filter returned that line, which is behavior I wouldn't like)

I'd like to filter a string on a specific column (in this case the "name" column) as the documentation says it's possible (but unfortunately I haven't been able to get it to work yet)

0 Kudos