Cannot edit saved submissions from connected project when ID is not matching

I have two forms, Form_1 the main form that has ID, name, age…etc. and another one Form_2 connected to the first one. When I put the ID in the Form_2, it auto-fills the other fields (name, age …).
However, the ID in the Form_2 is not required, sometimes I have to enter data without an ID. I just manually insert their details like name, gender, age, and leave the ID blank. This is a common scenario that for some people we have IDs, for others we don’t. Both forms are working without problems.

The issue comes when I try to edit a submission from Form_2 that doesn’t have an ID. When the form loads, it performs the calculation that fetches data from the Form_1, and because there’s no ID here, it returns nothing and it shows blank fields.

Form_2 has a repeat_group and I’m trying to edit one submission that has 19 people in the repeat_group. Enketo shows all 19 people with blank fields because they don’t have IDs.

I tried doing an IF statement to skip the calculation but it didn’t work.

Thank you

@Isslam, it seems like you are using the dynamic data attachment.

@Kal_Lam yes. Everything works when the ID is provided on Form_2. I need to edit submissions that don’t include IDs, for now I can’t because everything is blank when I try to edit.

@Kal_Lam any ideas?

Hi guys
I’m still stuck on this. Any help is appreciated

Have you tried editing from the backend Data Menu?

Yes. It’s not possible to edit because the questions are inside a repeat group.

First, your form is working as expected because you have configured it to pull data based on an ID, without an ID, it cannot know which data to pull, hence it returns blanks.

When you go to the back end and select the Data Menu, it shows you all submissions made and you can pick the specific un-ID’d data for edit, it should open it up for you to edit. However, if you already placed certain constraints that makes it impossible to submit the form again, then you will not be able to submit the edited data, otherwise I see nothing else that will stop you.

When it comes to repeat questions, my experience with them is that they are like temporary tabulation tables, they start all over each time they’re invoked using certain input data fed to them. If the input data remains same, then the expected output should be in line with the new selected edit values.

It’s not possible to edit from the back end because what’s inside the repeat group does not show up unless I opened the form for edit.

I did manage to get a solution by editing the xlsform and removing the calculation that gets data by ID, so now I am editing and everything stays in place and no blanks. I edited, submitted then re-deployed the original version of xlsform with the calculation.