Need to calculate to pull the objectID from the Survey. Tried ${objectId} with no success.
Solved! Go to Solution.
Hi Joe
The objectid for a survey feature is only allocated when the survey is submitted - as it is created by the server. It is therefore not possible to display this in a new survey.
Additionally, you can't include the objectid field as a question when creating a survey from an existing service. However, we do have an enhancement request open to allow the field to be displayed in the form.
Hi Joe
The objectid for a survey feature is only allocated when the survey is submitted - as it is created by the server. It is therefore not possible to display this in a new survey.
Additionally, you can't include the objectid field as a question when creating a survey from an existing service. However, we do have an enhancement request open to allow the field to be displayed in the form.
Johnathan Hasthorpe wrote:
you can't include the objectid field as a question when creating a survey from an existing service.
Thanks for the helpful information Johnathan Hasthorpe. Do you know if this would apply to all reserved fields? For instance, is it possible to put the "Creator" field (collected through editor tracking) in a survey form on an existing feature to expose the username who created a feature?
Hi Shannon,
Unfortunately, since the editor tracking fields are marked as non-editable, they can not currently be included in a form, even in a read-only context.
Thanks for confirming the expected behaviour here, James. Much appreciated.
Johnathan Hasthorpe or James Tedrick it it possible yet to display the OID on a form? Specifically, I want to show the OID for records opened via the inbox so I can access it and link to the survey123 site to review existing photos. This would be a form built on an existing HFS.
Use Case:
A Production survey is used to submit data
A QA/QC survey (built on HFS from above survey, with a few additional QA/QC comment fields) is used to review data. I would like to hyperlink to the record in the S123 site to easily view photos (example: https://survey123.arcgis.com/surveys/MySurveyID/data?objectIds=495)
Is this possible?
Hi @RobBlash, it is not possible to have ObjectId as a question when publishing a survey. Whether if you publish a new survey or use a submission URL to an existing feature service, you won't be able to publish and you'll get an error.
This is expected since the ObjectId field is essentially a non-editable field and besides ObjectId only gets created after you submit a form.
However, you may need to use the ObjectId of your existing submissions on your form for different reasons. For instance to append the ObjectId to a URL to create a link to send a query request or generate a link to Survey123 website and select a submission using the ObjectId parameter.
There is a workaround that enables you to pull ObjectId of existing features and pass it to a field on the form and use it in calculations as needed when editing existing survey submissions. In order to do this, you can add a question (with any type such as text, integer) to show ObjectIdss. The name for this field should match the name of the ObjectId field of the feature layer (case sensitive). You also need to set the bind::esri:fieldType to "null". By doing this, you will be able to publish your survey without any errors.
Best,
MJ