Select to view content in your preferred language

Data is cleared when deleting a post in repeat

509
2
Jump to solution
01-13-2023 07:46 AM
PatricWiström
Emerging Contributor

Hi!

We have a problem with the Survey123 field app version 3.16.114 The version we used before, 3.13 does not have this behavior.

In a repeat containing 3 questions where the 2 later are relevant to the answer of the first. If I enter 2 repeatposts with different answer to the first question, and then delete the first post, the data in the remaining repeatpost disapears. It's like the relevant expression evaluates with data from the deleted post.

If the 2 posts have the same answer to the first question the data remains.

For example: In the attached sample form, if I enter:

Repeatpost 1:  Type = "Animal" sel1 = "Dog"

Repeatpost 2:  Type = "Color" sel2 = "White"

Then I delete post 1 the remaining post shown up like: Type = "Color" sel2 = "" . 
The value "White" is deleted since it's not relevant to Type "Animal"

Can this behavior be avoided in any way or is it a bug in 3.16?

Survey:

typenamelabelrelevant
begin repeatrepeat0Repeat0 
select_one itemtypeitemtypeType of item 
select_one sel1sel1sel1${itemtype}="animal"
select_one sel2sel2sel2${itemtype}="color"
end repeat   

Choices:

list_namenamelabel
sel1dogDog
sel1catCat
   
sel2whiteWhite
sel2blackBlack
   
itemtypeanimalAnimal
itemtypecolorColor
0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @PatricWiström

Thank you for reporting this I'll go ahead and log an issue for this. To workaround the issue you can move the expressions from the relevant column to the body::esri:visible column.

Thank you,
Zach

View solution in original post

2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @PatricWiström

Thank you for reporting this I'll go ahead and log an issue for this. To workaround the issue you can move the expressions from the relevant column to the body::esri:visible column.

Thank you,
Zach
PatricWiström
Emerging Contributor

Thanks for quick response! 

Unfortunately, the body::esri:visible workaround is not an option for us in this case since we can't risk not relevant data being replicated to the database. Hopefully this will be resolved in a future release.

Regards,
Patric

0 Kudos