Sub Form (Linked form) not attached to master form

Hi everyone

  1. 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)

  1. 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

  1. Master form: survey_6_tank_ticket.xlsx (17.7 KB)
  2. 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.


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.