Hi everyone
- What is the problem? Be very detailed.
I have two form: Tank ticket and Tank. Tank ticket is the master form, and might have multiple entries of Tank (sub form). Everytime I insert new entries on sub form (tank), the master form list all sub form entries.
When I close the master form and open it again, the list of sub form entries are missing (as if there are no entry)
- What you have you tried to fix the problem?
I make sure that there are no error in field.
Can anyone give me hint on how to fix this problem, on some other linked form, it work as expected. But I couldnt figure it out whatâs wrong with this forms.
attached below my xlxs file
- Master form: survey_6_tank_ticket.xlsx (17.7 KB)
- Sub Form: survey_tank_ticket_item.xlsx (15.8 KB)
Hi @aliahadss24!
Looking at your form and the video of the behavior, I am guessing there is an issue with the tank_id. An easy way to check this is to see if it gets recorded correctly everywhere in tables. The specific issue is that it looks like you are assigning it as a date and then string in the master form, but have it as text in the sub-form. The different formats may mean that when it âlooksâ for the sub-form again it doesnât find any matching tank_id. Youâll want to make sure the variable has a consistent format both places, and may want to put it in the model statement of the master form to help with that as well. Iâm also not sure I would recommend using time as a unique identifier, setting up a truly unique ID is probably a better approach.
2 Likes
Thanks for pointing out, I will check and get back to you later
1 Like
I just realized that when assigning a unique identifier, I have to create a condition that check whether the field is already set or not.
something like this on calculation column: (data(âtank_idâ) !== null && data(âtank_idâ) !== undefined) ? data(âtank_idâ) : (data(âvesselâ) + â â + now())
Previously, the form keep reassigning the tank_id field with the latest time on the master form everytime I open the master form, thus make the subform have different tank_id with the master form which resulted to subform not linked to the master form.
2 Likes