Survey123 Tricks of the Trade: Web form URL parameters

100417
103
02-06-2019 08:00 AM
IsmaelChivite
Esri Notable Contributor
24 103 100K

[Updated February 28, 2020]

[Updated April 2, 2020]

[Updated July 13, 2020. Added autoRefresh]

[Updated March1, 2021. Added mode copy]

[Updated September 15, 2022. Added ?hide=leaveDialog]

[Updated September 22, 2022. Added ?forceRecalculate]

[Updated January 9, 2023. Updated ?forceRecalculate to ?recalculate]

[Updated August 25, 2023. Updated sample links]

 

Many web applications support the notion of URL parameters and Survey123 web forms are no exception. URL parameters allow you to dynamically pass data into your survey. This data can be used to prepopulate questions, hide questions, change the language of a form and many other things with your survey form. In this blog post, I will explore the options available in detail.

 

Before I start, I want to clarify that in the past we already covered how to use the Custom URL Scheme in the Survey123 field app. The concept of a Custom URL Scheme is similar to URL parameters, but they are two different things: the Custom URL Scheme applies to the Survey123 field app and the URL parameters discussed in this post only apply to web forms. That is, to forms loaded within a web browser, as opposed to loaded into the Survey123 field app in your device.

 

With that, lets get started:

 

The Basics

 

Lets first get familiar with how surveys get loaded into the Survey123 web app. Take the following URL:

 

https://survey123.arcgis.com/share/1cb28b212b5542acbbdbaa35feba0765 

 

The first part of the URL refers to the Survey123 web app: https://survey123.arcgis.com/share/ We host the Survey123 web app in our ArcGIS Online servers, and it is used to render your surveys as web forms.  The second part of the URL is the unique identifier of your survey. In this particular case, it is: 1cb28b212b5542acbbdbaa35feba0765  

The complete URL will open the Survey123 web app in your web browser and immediately present the survey id specified , in this case it is an Quick Tree Hazard Report survey.

 

So far, no URL parameters have been used, but now we are going to add one parameter to automatically populate one of the questions. Try the following:

 

https://survey123.arcgis.com/share/7fdcf75abfad4ae29f0156e161740d27?field:submitted_by=Fernando 

 

You will notice that now the Submitted By question is automatically adding the name Fernando in the survey. 

Immediately after the basic URL of the web form, I added a question mark (?). The question mark indicates that what follows are URL parameters. Next, I added the name of the parameter, which in this case is field:submittedBy and a value for that parameter: Fernando after the = sign.

 

You can add multiple parameters by simply separating them with an ampersand (&). For example:

 

...?field:submittedBy=Fernando&field:common_name=Oak

 

Next, lets learn about the different URL parameters you can pass to Survey123 web forms.

Setting values on questions (field:fieldname)

 

In the previous section you saw how a URL parameter can set a value to a question in your form, but lets take a closer look at how it works. The syntax is simple:

 

...?field:common_name=Oak

 

The name of the parameter is made  out of two distinct parts. First, you have the field: suffix and then you have the name of the question where you want to put a value.  Figuring out the name of a question can be tricky. The question name should not be confused with the label of the question. The label is what users see in the form. The question name represents the column in your feature layer  where the response will be stored. 

 

If you author surveys in Survey123 Connect, I am sure you already know what  I am talking about: The question name is represented by the name column in the survey worksheet of your XLSForm.  If you design your forms in Survey123 web designer, then finding out the exact name of your questions deserves a more detailed explanation.

 

After adding a question into your survey in web designer, you need to set its label and other properties, but not the name. The name of your question is automatically assigned by Survey123 web designer.  Assigning a valid question name needs to follow very strict rules (the name cannot start with a number, cannot have special characters, or  spaces and must be unique within your entire form) and that is why we put that out of your way in designer. This simplifies  authoring for beginners, although in cases like this it obscures what is really going on.   In any event, you can look at the question names by using the 'Modify Schema' link during the publishing process. 

 

Modify Schema in Survey123 web designer

 

The Modify Schema dialog will let you define the exact names of your questions only when you add your questions to the form for the first time. Once you publish your survey, questions that already exist in your survey will appear as read-only in the Modify Schema dialog.   In my case, I really did not want to change anything, I simply wanted to get the names so I could use them with my URL parameters.

 

Question names are case sensitive. You must pass the exact name. For example, in the oak survey, field:commonName=Oak will work, but field:CommonName=Oak will not work.

...?field:common_name=Oak

 

 

Centering geopoint questions (center)

 

The center parameter lets you set the default location of the geopoint question in your survey.  It looks like this:

...?center=34.1,-117

 

This parameter accepts a latitude/longitude coordinate pair where the values are separated by a comma.  Now. there are a couple of important things to remember when using this parameter:

 

  1. This URL parameter only takes effect if the geopoint question is flagged as required, AND
  2. If authoring from web designer, the option to 'Ask user's location when opening this question' must be disabled'.

 

If the geopoint question is not required or the user location is used, the values from this URL parameter will be overridden at runtime when the end-user opens the question.

 

Hiding questions and survey elements (hide)

 

The hide parameter is handy when you want to control visual aspects of your survey. You can load a survey and hide questions, the navigation bar and more.  This parameter takes as an input more or more values, separated by a comma.

 

Parameter Value Description

navbarHides the navigation bar. That is, the bar at the top of the survey that includes options to login/logout and to change the language. This is particularly useful when you embed your survey within a website. Example.
headerHides the survey header. The header typically includes the title of the survey or alternatively a banner image. This is particularly useful when you embed your survey within a website. Example.
descriptionThe description element is optionally included if you author your survey in web designer.
footerHides the footer element, which includes the Powered by Survey123 link, or an alternative link if you modified it. Also useful when embedding your survey within a website. Example.
themeUse the theme value to disable any custom theme applied to your survey.  Example.
field:fieldNameThis value is used to hide specific questions within your survey. If you want to hide multiple questions, simply add their names separated by a comma. If you want to hide a question within a group, reference it by its full path: field:groupname/questionname. Example hiding the Submitted by and Survey Date questions.
leaveDialog

Use this value if you do not want the web browser to request user confirmation before leaving the web browser survey page.

IsmaelChivite_0-1663634138443.png

 

 

The hide parameter is very flexible, allowing you to hide multiple elements at once. That is, you can hide the navigation bar, the footer, description and as many questions in the survey as you like.   To hide multiple elements, you simply need to keep adding comma separated values to hide the different components. For example:

 

...?hide=field:submittedBy,field:surveyDate,theme,footer

 

Another interesting thing you can do is hide a question and at the same time set its default value through a URL parameter. For example, you can hide the Submitted by question in the Oak survey and also set a value for it through your URL parameter.

 

Adjusting the width of the survey in the screen (width)

 

The width parameter sets the width, in pixels, of the survey in the screen. For example:

...?width=1500

Automatically reload the survey after a record is submitted (autoRefresh)

 

Using the autoRefresh parameter your survey will reload immediately after a survey is submitted. This is very useful when people are expected to repeatedly send data from a survey.

...?autoRefresh=true

Do not forget that the parameter is case sensitive. Works with version 3.10 and above.

 

Edit existing records and opening surveys in view-only mode (mode)

 

The mode parameter supports the values edit and view.  Combined with the globalid parameter, you can easily open specific records in edit or view modes. For example, here is how you can update an existing record:

...?mode=edit&globalId=56cf0f7a-def7-4402-bd2c-536b717637bb

There is a lot you can do with this (mode=edit) alone. Go to https://community.esri.com/groups/survey123/blog/2019/05/24/survey123-tricks-of-the-trade-editing-re... for more details.

 

Similarly, you can also open a survey in view-only mode.

...?mode=view&globalId=56cf0f7a-def7-4402-bd2c-536b717637bb

 

If you get an error like shown below when opening a record in view mode, you will need to adjust the sharing.

 

 

When a survey is shared for viewing, the Survey123 web app uses a special feature layer view built so users cannot edit your data. This feature layer view is created only when you share your survey results for viewing. That is done through the Collaborate tab in the Survey123 website, by selecting the Viewer section and then sharing with the appropriate groups (and clicking save... ).

 

 

Recalculate values when in edit mode (recalculate)

 

Use the recalculate URL parameter to force certain fields to be recalculated, even if the record is opened in edit mode. This can be very handy, for example, if you want to record the name of the person editing the record, or to refresh the date when the record was last edited.

 

...?recalculate=field:question1,field:question2

Copying (cloning) existing records

 

The mode parameter supports a third value: copy.  It is used to load the smart form with information from an existing record and to create a new record when the user submits:

?mode=copy&globalId=56cf0f7a-def7-4402-bd2c-536b717637bb 

 

Set the app that will open your survey (open)

 

You can use the open URL parameter to determine the app to use with survey. Valid values for this parameter include: web, native and menu.

 

...?open=menu 

Parameter Value  Description

webOpens your survey in the Survey123 web app, as a web form. This is the default. 
nativeWill open your survey in the Survey123 field app. This option will only work if the Survey123 field app is already installed in the device. 
menuWill open web page to let the end user decide if the survey should be open in the Survey123 field app or within a web browser. 

 

Set the language of your survey (locale)

 

You can use the locale parameter to define the language of your survey. For more details on mutiple-language surveys refer to https://community.esri.com/groups/survey123/blog/2019/01/23/introducing-multiple-language-surveys 

The locale parameter accepts ISO language codes. For example: locale=zh-cn  or locale=en.

Below is a clever example where this parameter is used to help end users switch the language of the survey right from within a note in the form.  You can see the different links added. Each of these links uses the locale parameter to reload the form in a different language within the web browser.

IsmaelChivite_0-1614705559990.png

Encrypt URL parameters

 

If you are concerned about having your URL parameters in clear text, you can encrypt them. To learn more check out Survey123 Tricks of the Trade: Encode URL parameters in the web app.

103 Comments
by Anonymous User
Not applicable
PeterVisser
Frequent Explorer

Hi @IsmaelChivite, @JamesTedrick , @Ruth_JiatengXu ,

Is it possible to create an url with a centering geopoint, combined with an custom basemap? My url with custom basemap doesn't zoom in to the right coordinates but to the coordinates defined in survey123 connect.

 

Thanks!

DezsoLovicsek
Occasional Contributor

Is there a way to hide or collapse a group upon opening by using a URL parameter?

JoshHabel
Frequent Contributor

Is there a limit to the number of fields values you can send from one survey to another through a single url or am not doing something correct with my url?  I have survey in which I want to send the values of up to 18 different fields over to a separate survey.  I have had success sending up to 4 field values over but not with the rest.

Thanks!

concat('<a href="arcgis-survey123://?itemID=MYSURVEYSUNIQUEID&field:Code1=100&field:Form_Type=Damage_Log','&field:Crew_Size=',${Crew_Size},'&field:Truck_Units=',${Truck_Units},'&field:Name_1=',${Name_1},'&field:Position_1=',${Position_1},'&field:Name_2=',${Name_2},'&field:Position_2=',${Position_2},'&field:Name_3=',${Name_3},'&field:Position_3=',${Position_3},'&field:Name_4=',${Name_4},'&field:Position_4=',${Position_4},'&field:Name_5=',${Name_5},'&field:Position_5=',${Position_5},'&field:Truck_1=',${Truck_1},'&field:Truck_2=',${Truck_2},'&field:Truck_3=',${Truck_3},'&field:Truck_4=',${Truck_4},'&field:Truck_5=',${Truck_5},'">Send To Survey 2 Form</a>')

DesignTech
New Contributor

Is there a way to populate an image field? I've got an image URL, and I'd like to add this as an image to the survey.

RobertAnderson3
MVP Regular Contributor

I have a question about the auto-refresh parameter.

My situation is a little different as I'm using the Survey123 widget in Experience Builder, but when I submit a survey it does automatically refresh, however I don't want it to in this case. Any idea on why this would be or how to stop it?

RyanBohan
Frequent Contributor

Can I use a URL to prepopulate and then make it read only for a web entry?

I am looking to use this from a map pop-up so the business name can be prepopulated.  I do not want the person filling out the survey to have the option to change the business name. 

I still want to display the business name in the survey but make it read only or a note.

DurhamGIS
Occasional Contributor
Try the reply from TimothyMichael with the Excel cheat sheet in this post:
https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-in-survey123-from-existing-fe...

I think you can use the item ID for the feature service that includes the business name and then build the parameters with your desired fields. And mark the field that includes the parameter as read-only in the Survey123 spreadsheet.

Kelly
NourSalam
Occasional Contributor

Can you please give an example on how to pass field parameters for a survey on Enterprise? I am able to open my survey but unable to figure out how to pass parameters.
Thanks!

HayleighFisher
Regular Contributor

@IsmaelChivite

Hi, 

Is the capability to edit an existing feature in the field application via URL supported yet? 

Since the inbox functionality does not support attachments we are at a stand still with our workflow. What are the available options to be able to allow users to edit existing features (and attachments)? We want to be able to email the users a link to the survey assigned to them and then it open up and let them populate the rest of the data in the feature service via the survey123 mobile app. Currently it appears like this is not possible. 

 

Thanks,

Hayleigh 

ZhifangWang
Esri Regular Contributor

Hi @RobertAnderson3 , 

The Survey widget in Experience Builder always adds a ?autoRefresh=3 URL parameter to the user specifies in it. In the future, it will be removed and expose as an option in the Survey123 web designer. You can track this by BUG-000134729.

 

For now, as a workaround, you can use the Embed widget in Experience Builder and specify the Survey123 web app URL to embed a survey.

ryanEvanczyk
Frequent Contributor

Just wondering if there's been any update to a view-only mode for the URL parameters?

I want to be able to view the results of a survey in a dashboard, but not submit or edit. I found that reviewing the data in the dashboard was easier for our end users than logging into the Survey123 website and reviewing that way. (There is a view layer published for the survey).

I've tried "?mode=view&globalid" and I get the error "Editing is not possible because the globalId parameter was not provided." If I provide a globalid in the URL, than it functions appropriately, but I'd like for the user to choose the record in a list, and then have that update the embedded content.

Any help is appreciated!

RyanE

Ruth_JiatengXu
Esri Contributor

Hi @ryanEvanczyk 

Thanks for sharing here! You could add a list with all records to your dashboard, and add the survey as the embedded content that reference to the list:

Ruth_JiatengXu_0-1630915119361.png

 

I think this blog https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-embedding-a-survey... and this article https://support.esri.com/en/technical-article/000021897 are worth reading.

Thanks,

Ruth

 

Ruth_JiatengXu
Esri Contributor

Hi @Amanda_Huber 

To duplicate a record you could use the copy mode with &mode=copy&globalId={globalId}.

Thanks,

Ruth

Ruth_JiatengXu
Esri Contributor

Hi @PeterVisser 

If ?center= does not work, could you please try field:{geopointQuestionName}={latitude, longitude and altitude (optional) separated by spaces}. See note below the table:

https://doc.arcgis.com/en/survey123/reference/integratewithotherapps.htm#ESRI_SECTION1_C7595C0E961B4...

Thanks,

Ruth

Ruth_JiatengXu
Esri Contributor

Hi @DezsoLovicsek ,

You could hide a group (not able to see the group completely) through URL ?hide=field:{groupName}

You could set a group "Collapse by default" in the designer, but you can not make it collapse through URL.

Thanks,

Ruth

Ruth_JiatengXu
Esri Contributor
StuartMoore
Frequent Contributor

unfortunately the edit=copy doesn't work with our surveys, i am assuming that its because they are very complicated with lots of repeats (10 i think), i was expecting that as we have to use the Survey123 app rather than the web form.

it would be handy if the copy functionality could work with more complicated surveys like ours and also work with the Survey123 app

our sort of use case would be to find an existing survey in collector, and then click a smart link that opened a copy in the survey123 app, at the moment we have to manually clone the surveys using a script i created...

thanks

Stu

JodyZhengLiu
Esri Contributor

Hi @StuartMoore ,

 

Thanks for the feedback, is that possible to share the xlsx form of your complex survey so we can reproduce the issue you described for copy mode? You can send it to my email: zliu@esri.com

BTW, to use the copy mode you need to put ?mode=copy in the URL, not edit=copy. Not sure if it's a typo though😊

Thanks a lot,

Jody Zheng Liu

 

StuartMoore
Frequent Contributor

@JodyZhengLiu yea just a typo on my part, ive sent you the xlsx (we created the survey using Connect which might also explain why it wont copy)

thanks

Stu

esride-nik
Occasional Contributor

@Ruth_JiatengXu,

I can confirm what@CharlescobBailey says: Passing coordinates to a geoshape fiel via URL parameters does not work in the web app. The map seems to reload right after it appears, but then nothing happens.

I hacked it though:

esridenik_0-1633446374245.png

You can pass the coordinates to another field (which you can hide by making it type hidden, not text) and use its value as calculation input for the geoshape field.

May also still be of interest for @ChrisRoberts2.

Cheers
Nik

SSMGroup
Regular Contributor

@IsmaelChivite @Ruth_JiatengXu  I'd like to hide all but a few questions in my survey.  The problem is that I'm using the field-list display.  So even though I've hidden all the questions, the empty pages are still there.  I don't want the user to have to click through 7 empty pages just to resubmit an update to a survey.

 

I figured it out! In addition to referencing the group for the field, you also have to hide just the group.  ie.  ....hide=field:PAGE1,field:PAGE1/FIELDNAME

TylerDeBruin
Occasional Contributor

@Ruth_JiatengXu  Is there a way to pass an attachment or image using a URL parameter?

PeterMacKenzie2
Frequent Contributor
ZoevdbAT
Frequent Contributor

I'd like to use a field like Submitted by= but use the created_user as name of the submitter. I imagine in the URL it must be something like &amp;field:submittedby={created_user}& etc. Unfortunately this doesn't work. Does anyone have a solution for this? 

 

*update*

I'm going to work with FME to add the Creator from the Survey layer, which is the user I want to have, to the field I want filled. 

This is only possible because in my proces I already need it to pass through FME. 

However the question is still relevant, I don't want to use survey123connect and using the field username seems to be lacking sometimes. 

 

JeremyBrown4
Occasional Contributor

Very helpful post @IsmaelChivite. I have question about setting values on a question. Is it possible to add a number to a field with a number in it already utilizing( field:fieldname) while in edit mode? This would be used for example to add a count of likes or dislikes to an existing survey record. This link would be placed into a web map  popup and set to edit the record attached to the polygon selected. The last part in red is what I can't get to work. Is it even possible to add to the current field value with URL parameters, or is my syntax just incorrect?

 

?mode=edit&globalId={globalid}&field:likes={likes}+1

JhoanUrquia
Emerging Contributor

Hello @JodyZhengLiu 

Im trying to use "mode=copy" in my survey on Portal, and is not working. Probably this parameter depends on the version of Survey installed on the portal?

Thanks in advance

JhoanUrquia_1-1660166381196.png

 

 

Ruth_JiatengXu
Esri Contributor

Hi @JhoanUrquia ,

The mode=copy was introduced in 3.11, so it works on the survey published with 3.11 or the newer version.

The survey version can be checked in the browser using the console tab of the developer tool (F12).

If the survey was published with the older version, you could use ?version=latest&mode=copy&globalId={} to view the behavior before you republish the survey.

Please let me know if adding verion=latest cannot solve the issue.

Thanks,

Ruth

JhoanUrquia
Emerging Contributor

Hi @Ruth1 ,

I still have the problem, i looked at the properties on Console and these are the parameters:

app-loader-v3.11.1603868784767.chunk.js:2 ------------------------
app-loader-v3.11.1603868784767.chunk.js:2 Connect Survey
app-loader-v3.11.1603868784767.chunk.js:2 portalUrl: https://gis.ext.icrc.org/portal
app-loader-v3.11.1603868784767.chunk.js:2 itemId: 2a0d1840ee044a8cb841e6dfdf679d3b
app-loader-v3.11.1603868784767.chunk.js:2 survey published: 3.14 (publishInfo in .info)
app-loader-v3.11.1603868784767.chunk.js:2 transformer version: 2.1.1 (=> v3.11)
app-loader-v3.11.1603868784767.chunk.js:2 latest survey123 version: 3.11
app-loader-v3.11.1603868784767.chunk.js:2 webformInfo.isVersionLocked: undefined
app-loader-v3.11.1603868784767.chunk.js:2 need to upgrade webform: false
app-loader-v3.11.1603868784767.chunk.js:2 use parameter version: true
app-loader-v3.11.1603868784767.chunk.js:2 final render survey123 version if no parameter: 3.14
app-loader-v3.11.1603868784767.chunk.js:2 final render survey123 version: 3.11
app-loader-v3.11.1603868784767.chunk.js:2 ------------------------
app-render-v3.11.1603868784767.chunk.js:2 [I]

I tried to publish a standard form without any calculation or repeats from Survey123 templates, and it doesn't work neither. I made a test outside the portal, with ArcGIS Online directly, and its working, but i noticed a difference in the globalId Code. In the portal is on Uppercase and in ArcGIS Online is in lowercase, this could be a problem? 

LinnGIS
Emerging Contributor

Is it possible to populate repeat questions using url parameters? If so how could his be done?  I have a survey with two repeat questions and I would like to auto populate the repeats using URL parameters that would be created dynamically from another application. I can totally get the normal fields to populate using &field:TestField=TestValue but I don't know what syntax to use if a have values for multiple records in a repeat question.

lzk222
by
Regular Contributor

Is it possible to pre-populate a Survey123 form that is hosted by a different web server?

 

For instance, I have this form hosted by AWS. I'd like the Location ID (location_id_required) field to be prepopulated from a map feature (pop-up has url configured to include "?field:location_id_required={expression/expr6}" at the end of the URL).

Thanks,

Lukas

Tiff
by
Frequent Contributor

Hello, to echo @HayleighFisher's question from 2021, could you please confirm whether editing records in Survey123 is supported now through Survey123 field app using the URL parameter? Unfortunately the open parameter for open=native is not working for me, where the Field Maps pop-up will still open up the survey in a web browser.

LMedeirosUI
Frequent Contributor

@Tiff If you're using the field app to edit records, turn on the inbox. I think we're doing something similar - adding photos to records after submitting a survey. I do this by enabling the inbox (which means you'll want to disable the sent folder). What this does is downloads each submission to your device and allows you to open a particular submission and add photos to the individual records within your repeat.

 

Here's more information: https://doc.arcgis.com/en/survey123/desktop/get-answers/editexistingdata.htm#ESRI_SECTION1_47C2CB834...

Tiff
by
Frequent Contributor

Thank you @LMedeirosUI ! I actually looked into the Inbox just yesterday and was exploring the capabilities. It is helpful for some functionality (like the image file name issue) that is not working for me in the web browser. However, the map and label display for the Inbox is not ideal and may confuse our users. That's why I'm looking into a workflow where they start in Field Maps and click on the Survey123 link.

LMedeirosUI
Frequent Contributor

@Tiff I guess I'm getting confused about your workflow.

Start in Field Maps (an app I'm not familiar with), locate site your user wants to edit/append, click on a S123 link to reopen the original survey and edit it?

Which means you aren't using (or avoiding) the S123 Field app, so the inbox wouldn't work.

I do know that there are differences in how the S123 web app and S123 field app work. For example, having the theme-grid setting breaks the photo question in the web app.

Here's a run down of differences: https://doc.arcgis.com/en/survey123/desktop/create-surveys/quickreferencecreatesurveys.htm

Here's more info on appearances: https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformsappearance.htm#

Tiff
by
Frequent Contributor

Hi @LMedeirosUI yes, the workflow actually functions quite well for starting in Field Maps (pop-up is configured with a URL parameter that identifies the correct record to collect survey data on). They would be editing not the feature but creating a related record (repeat) instead. The only issue I am experiencing with the web browser is the image file name, which is not the worst thing ever but there are over 10 image questions, which is why it would be helpful to be able to customize the file name. That's why I was also hoping to resolve the open=native parameter so we could ensure the renaming could work in the field app.

The Inbox is also not ideal due to the clunky map functionality; otherwise, I would have suggested using the Inbox and Survey123 field app to only need one phone app. Field Maps may be a lot easier for the team to identify where they are and inspecting the correct feature.

by Anonymous User
Not applicable

Is it possible to redirect to another application on survey submission? I've enabled a Survey in one of my Workforce projects. After the field worker submits the survey at assignment and sends the response the Survey123 app stays open. I would like to redirect them back to Workforce so that they can complete the task and move on to the next. I would also love to see the status of the assignment change based on the Survey submission. i.e. if I add a Status question and they select complete, I would like the Assignment in Workforce to update so that they don't have to click on it again.

RobertAnderson3
MVP Regular Contributor

@Anonymous User 

For the redirect I just figured this one out myself, you'll need to go into the Workforce feature layer, and then the "Assignment Integrations" table, in the URL template column you can modify the link there. Add in the callback=https://workforce.arcgis.app and I had it working.

I've added the idea to make it in the menu options of Workforce here:
https://community.esri.com/t5/arcgis-workforce-ideas/workforce-and-survey123-integrations-tab-callback/idi-p/1275806

The only way currently I see the ability to change the Status on the Workforce assignment is if you build the Survey off of that layer, you can add fields to the Assignment layer no problem.

RobertAnderson3
MVP Regular Contributor

A while ago I had posted a question about external choice lists not updating when you access a Survey123 form via a URL. I wanted to check if this had been updated at all or if there's any word on when it will occur. Opening Survey123 from Workforce or Field Maps but not having it check for updates on these files is a big flaw.

Original post: https://community.esri.com/t5/arcgis-survey123-questions/external-choice-list-not-updating-when-surv...

 

by Anonymous User
Not applicable

Thank you SO much! I Would have never though to look in that table. How are you able to edit the URL? When I try to click on it in the attribute table (I've added all of my workforce feature services to ArcGIS Pro) nothing happens. When I open the map in ArcGIS Online the URL Template field just contains the word View.

by Anonymous User
Not applicable

I was able to add the call back to the end of the URL in the URL Template field by copying & pasting the URL into a notepad file, adding the call back to the end and then pasting it back into the field. I wasn't able to double click on the field to edit or use field calculator to update the Url in ArcGIS Pro.

EgleAdmin
Occasional Contributor

@IsmaelChivite The hyperlinks in this post don't seem to work -- they take me to surveys that are inaccessible.

EgleAdmin_0-1692976979061.png

 

IsmaelChivite
Esri Notable Contributor

@EgleAdmin  Fixed. Thanks for pointing this out. I guess I deleted the original survey some time ago!

HowardKim
Emerging Contributor

@IsmaelChivite 

It's a very thorough content.

However, I don't know why the link from the above doesn't populate the values. I was able to do the similar things with my portal. But with AGOL, it doesn't work. Is there a possible issue with the browser(chrome)?

HowardKim_0-1706628500150.png

 

ChristianCordova
Emerging Contributor

Hi there, great post!! 

I am experiencing an issue when populating using pulldata("@layer", ..) function for a question, when I pass the value as a url parameter for that question I noticed that the value filled correctly just for one second, then it disappears. 

url: https://survey123.arcgis.com/share/xxxxx?field:is_web_version=yes&field:sector_code_web=88

In my Survey123 sheet I have two hidden questions which will be filled by the URL params:

typename
hiddenis_web_version
hidden

sector_code_web

 

Both of them fills well. But for the other question I have an expression in the calculation column:

typenamecalculation
textsectorcif(${is_web_version}='yes', ${sector_code_web} ,pulldata("@layer", "getValueAt", "attributes.sector", ${url_feature}, ${location_geopoint}))

 

Is there a way the value passed via URL prevails constantly?

Thanks in advance!

 

AnthonyJonesRSK
Frequent Contributor

Hi,

I've recently been using url parameters to hide a repeat when a user edits an existing record. The repeat is used to capture a second location and we don't want the user to change it in certain circumstances. I'm not sure if this is expected behaviour but I'm finding that the repeat is deleted from the feature service when the user submits the record when accessing the form with the repeat hidden by the url. My expectation was that the repeat would still exist but would simply not show in the form. 

If someone from the team could confirm if this is a bug or expected behaviour it would be much appreciated.

Thanks

Anthony

NourSalamJMT
Occasional Contributor

@IsmaelChivite @JamesTedrick I am in ArcGIS Enterprise 11.1, using a non-hosted feature layer. I have my submitter and viewer correctly shared with the same group within the Survey123 web manager, however, when embedding a survey123 using view-only mode in a dashboard, I get the "You do not have permission to view this survey record". I have zero issues when using edit mode. I am not sure where to go from here! I am in Survey123 version 3.18 but I also tried using a url scheme with version=latest and it did not work either.

Ruth_JiatengXu
Esri Contributor

Hi @NourSalamJMT ,

Thanks for sharing here! Could you please check the setting for Collaborate -> Share results -> What data can viewer see? Do you have the option "All records in this survey" selected?

Thanks,

Ruth

 

Ruth_JiatengXu
Esri Contributor

Hi @AnthonyJonesRSK 

Sorry for the late response. What you described is not an expected behavior, I can reproduce the issue with version 3.19. It seems like the issue has been fixed in version 3.20, so could you please try with additional parameter &version=latest in the URL? If the version 3.20 fix your issue, then you can republish your survey with Connect version 3.20+.

Please let me know if you have further questions.

Thanks,

Ruth

Ruth_JiatengXu
Esri Contributor

Hi @ChristianCordova ,

Sorry for the late response, the pulldata layer functions does not work in the if statement. The pulldata layer function will assign the null value to the question regardless of whether ${is_web_version}='yes' is true or not.

Could you please try split the pulldata layer function to a new hidden question, and reference the value in the if statement?

Please let me know if you have further questions.

Ruth