Hi,
When retrieving a record in the web form I would like to show the original record and allow the user to update it if required.
The update will be initiated by a drop-down list.
I keep running into cycle dependency errors, I’m not too sure how to keep the original value before it is possibly overwritten by ${OWNER_List} selection event.
Any help would be thoroughly appreciated.
Regards,
Elliott
You won't be able to run that calculation as it references itself. The simplest thing would be to add another field to make that calculation OwnerID_Final = if(string-length(${OWNER_Update})>0,${OWNER_Update},${OWNER_ID}).
Thanks Neal,
Moving the calculation to another row works as expected, but how do I get the calculated OwnerID_Final value back into the OWNER_ID field for it be written back to the database?
Regards,
Elliott
You can just collect OwnerID_Final to be your id in your database. Or if it has to be OWNER_ID, change the naming around so instead:
OWNER_ID_NEW = Integer Entry
OWNER_ID = if(string-length(${OWNER_Update})>0,${OWNER_Update},${OWNER_ID_NEW})
Then you can null any entries you don't want in the database
Hi Neal,
Thanks again for your reply and solution, unfortunately I cannot get the workflow I require to work within survey123 to keep/display the original record (retrieved from the feature service) or allow the user to replace the value if they choose from a drop-down list without running into a cycle dependency.
I'm unable to add any additional columns and do post processing to modify the result later.
Regards,
Elliott
@ejrcarson using null in the bind::esri:fieldType column you can add fields to the form though and just use them for display/calculations so in my example you would null "OWNER_ID_NEW". The caveat is you wouldn't be storing the text entry unless they didn't do the dropdown but that would be the same as your proposed workflow, so it should work.