This was working fine for me a couple days ago, but now I am not able to define a calculation in a Survey123 field. I am editing in the Survey123 website.
I have a field called 'Site Name' that I want to automatically populate based on another field called 'Site ID'. I'm using the calculation function to filter a layer file based on the Site_id attribute as in the screenshot below. It seems to work fine and I Save the form, but when I leave to the Overview screen and then return to the Design screen the calculation function is completely gone. It doesn't matter whether I publish or not. The calculation does not get saved. This was working fine a couple days ago. What could be wrong?
Edit: Note that this works fine if I create a new survey from scratch. Why can't I edit an existing survey?
Solved! Go to Solution.
I figured out what the issue is, and ESRI has confirmed that it is a bug. It is related to the Pages that I have in my survey. If I remove the Pages, then I am able to add the calculation to the Site Name field with no issues. Everything works fine when there are no Pages. After I have added the calculation, I am able to add back the Pages and the survey works fine for the end user. However, as soon as I add back the Pages I am no longer able to edit the calculation of any of the fields. The workaround until ESRI fixes the bug is to remove Pages, make your edits, and then recreate the Pages.
Is the data in the same layer? You can use the Question as a Source
I'm not sure what you mean by the same layer. The site ID and site name are both in the WQ_Sites_All_Years_DB layer. The user enters site ID in another field. I want this field to return site name.
I figured out what the issue is, and ESRI has confirmed that it is a bug. It is related to the Pages that I have in my survey. If I remove the Pages, then I am able to add the calculation to the Site Name field with no issues. Everything works fine when there are no Pages. After I have added the calculation, I am able to add back the Pages and the survey works fine for the end user. However, as soon as I add back the Pages I am no longer able to edit the calculation of any of the fields. The workaround until ESRI fixes the bug is to remove Pages, make your edits, and then recreate the Pages.