Linked sub child to the parent table

Hello I have parent table (team building) linked with table office and the office table is linked with mobiles, pc tables
I can link the parent with the child ( team with office ) and then I linked the child with the sub child ( office with mobile and pc) but the thing is that I want to link the mobiles and pc with the team also, because if I will do other building that has the same name of office I will not receive the information of the other team .

this is the parent
netwerk_inventaris.xlsx (19.9 KB)
this is the child
office_info.xlsx (19.9 KB)
and thi is the sub child
ethernet_prise.xlsx (14.9 KB)

and when I add in the child office selection local_num = ? and brigade_num = ? ( local_num is office number and brigade_num is the id of the team ) nothing happens a can no more add mobiles or something from the sub child but when I delete the brigade_num from the selection it works but only linked to the office

can anyone help me?

Hi @benamor!

Can you explain a bit more about what you are trying to do here? Especially I am not clear if you want to run a query for something about the sub-child form or if you want to access the sub-child form (as a linked table) in the parent table. These would have different solutions.

For the issue

it looks like in the query to open that sub-form the brigade_num is not being mapped from the office (child) to mobiles (sub-child), only the loc_num. I think you need to include the brigade_num in the mapping. It’s in the sub-child model, but I don’t think it is populating with any data.

hi @elmps2018

thank you for the answer and how can I map the brigade_num and loc_num at the same time?

example = I make survey team 1212 in Brussels they have office number 213 and in this office, they have 3 mobile and 2 pc. I scanned the barcode of the 3 mobiles and 2 pcs and then I do office 214 the have 2 mobile 1 pc.
and then I go to the team 12345 in Paris which has the same number of office 213 when I write the number of the office I receive the information (mobiles and pc) from office 213 from the team 1212

and when I want to link the team survey to the office survey and then the sub child linked to the team and the team in the queries of office I have
query_name …selection… …selectionArgs
linked_mobiles … local_num = ? and brigade_num ? … [ data(‘local_num’), data(‘brigade_num’) ]

but it works not and when I linked only with a team it works but I receive all mobiles of all office and not mobile of every office

To map two variables at the same time you can put in the newRowInitialElementKeyToValueMap column something like:
{ q100 : data(‘q100’) ,
individualid : data(‘individualid’) ,
pid : data(‘pid’) }

For the example, if you want buildings with the same office, you can do a selection:
office_num = ?
and selectionArgs:
[ data(‘office_num’)]

The selection and selectionArgs are what are going to determine which offices and teams are shown, so you need to make sure that that syntax aligns to what selection you want.

@elmps2018 Thank you, Caroline, like always you save my life.