Select to view content in your preferred language

Existing record not opening when linking Field Maps to Survey 123

756
5
Jump to solution
08-15-2023 10:14 AM
pmccord
New Contributor III

I'm attempting to open an existing Survey 123 record from Field Maps. So, when a polygon is tapped on within Field Maps, it opens up the existing record in Survey 123.

This is being done within Portal, not AGO. I've configured my URL like this:  arcgis-survey123://?portalUrl=https://gisportal.XX-XX.com/portal&itemID=05af890f3d1a4dc6a82484a935933454&mode=edit&globalId={globa...}

This was formatted by following this post from Ismael: Survey123 Tricks of the Trade: Editing records in ... - Esri Community

The workflow that I need is for one user type to be able to fill out the initial record and then another user type opens up the existing record and signs off (using the Signature field type in Survey 123).

I have the survey completely set up and the URL that I constructed will open Survey 123 from Field Maps; however, the record is empty. I've tried many alternatives to this and I'm certain I'm pointing to the correct Global ID field. Is this a known shortcoming, or do I have my URL formatted incorrectly?

Thanks,

Paul

2 Solutions

Accepted Solutions
JenniferAcunto
Esri Regular Contributor

The field app uses action=edit. Mode=edit is for the web browser. 

Integrate with other apps

- Jen

View solution in original post

ChristopherCounsell
MVP Regular Contributor

Separate issues are best in separate posts to allow members of the community to chase the sweet internet points. Suggest marking their post as the answer to your question.

Sounds like your new issue is tied to calculation modes. Force the re-calculation of the username property field. by adding calculationMode=always to the ${theusername} field.

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-calculation-modes/...

If that works, please just add this as an additional answer. Otherwise maybe create a new post, share the XLSForm, and tag us in it so we can continue 🙂

View solution in original post

5 Replies
JenniferAcunto
Esri Regular Contributor

The field app uses action=edit. Mode=edit is for the web browser. 

Integrate with other apps

- Jen
pmccord
New Contributor III

Thank you Jennifer. This solved my issue! The URL that I put together that opens the existing record in edit mode is: arcgis-survey123://?portalUrl=https://xx.xxxx-xxx.com/portal&itemID=4e0d8fc4cbc946009db5a832aa4b9dbd&action=edit&update=true&q:glo...}

I'm having a new issue though in that the Survey 123 form that I've set up should only have certain fields editable depending on the user who is editing the survey. I've set this up using conditionals in the readonly field within Survey 123 Connect:

pmccord_0-1692203862190.png

 

However, this doesn't seem to be honored when the existing record opens in Survey 123 (from Field Maps). The fields that are available for editing for the user who initially submitted the survey become available for editing for every subsequent user who edits the survey, regardless of whether they meet the readonly condition or not.

I'm happy to post this as a separate question since it's a little unrelated from the initial post.

Thanks again!

ChristopherCounsell
MVP Regular Contributor

Separate issues are best in separate posts to allow members of the community to chase the sweet internet points. Suggest marking their post as the answer to your question.

Sounds like your new issue is tied to calculation modes. Force the re-calculation of the username property field. by adding calculationMode=always to the ${theusername} field.

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-calculation-modes/...

If that works, please just add this as an additional answer. Otherwise maybe create a new post, share the XLSForm, and tag us in it so we can continue 🙂

pmccord
New Contributor III

That was it! I needed to add the following to the calculation field:

pmccord_0-1692303439860.png

 

And then I had to add calculationMode=always to the bind::esri:parameters field:

pmccord_1-1692303490252.png

 

Basically, it looks like I wasn't updating the 'theusername' field with the username of the person who was currently editing the form. Now that it is updating, the appropriate fields are readonly. Thanks again!!

ZacharySutherby
Esri Regular Contributor

Hello @pmccord,

You won't need to use the if() function in the readonly expression. You should be able to use ${theusername} = "pmccord" in the readonly column for the questions you want to be readonly and for the questions you want readonly for the other users you can use ${theusername} != "pmccord" as the readonly expression. 

Thank you,
Zach