Select to view content in your preferred language

Calculated Field Dissappearing

272
1
09-08-2023 12:25 PM
BrandonA_CDPH
Occasional Contributor II

I am having a strange thing happen to my Survey. I have published a survey with two fields that have similar calculations, they both fill automatically if a previous selection is Control or Product - otherwise they should be blank. Both fields are required. Here are the calculate formulas am using:

  • Field A:  if(${SampleCategory} = 'Control' or ${SampleCategory}='Product', '',${SampleCollectedFromName})
  • Field B:  if(${SampleCategory} = 'Control' or ${SampleCategory}='Product', '',${SampleCollectedFromAddress})

For Field A, I am having a weird thing happen. When an entry is manually entered into the field, the text shows up, and the form will let you submit the entry (the required is met). In the Feature Service (Survey123 Webiste, survey Inbox, etc.) the field is blank. When I go back in to edit it, I can again type in the field and it looks right, but when  submitted it is blank.

Here's the strange part. First, I noticed that the manually entered data is blue after tapping out of the field (like it was a calculated value). Second, I can enter data, tap out of the field (data is there), tap the x (to clear the field), then reenter data manually into the field, that data sticks and submits to the Feature Service as expected. Also, this question is in a group with a relevant statement. If the group is not relevant, the calculation works as expected and the data is submitted to the Feature Service.

Field B works exactly as expected and submits data to the Service with no problems. The two fields are nearly identical (except which field is pulled in for the calculate) and they are behaving differently.

Banging my head against a wall with this one.  Hoping someone has some insight as to what is happening. 

0 Kudos
1 Reply
BrandonA_CDPH
Occasional Contributor II

I'm posting a reply to hopefully bring the back to the top and get some assistance. 

I keep poking around online, in my xlsForm sheet, asking around my groups - I can't figure out what's going on. Any advice (no matter how obvious it seems) would be appreciated.

0 Kudos