Select to view content in your preferred language

Keep original value or overwrite - cycle dependency error

686
5
03-05-2026 10:43 PM
ejrcarson
Occasional Contributor

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.

image001.png

Any help would be thoroughly appreciated.

Regards,

Elliott

0 Kudos
5 Replies
Neal_t_k
MVP Regular Contributor

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}).

0 Kudos
ejrcarson
Occasional Contributor

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 

0 Kudos
Neal_t_k
MVP Regular Contributor

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

https://support.esri.com/en-us/knowledge-base/faq-how-does-specifying-the-bind-esri-fieldtype-column...

 

0 Kudos
ejrcarson
Occasional Contributor

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

0 Kudos
Neal_t_k
MVP Regular Contributor

@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.  

0 Kudos