SOLVED

Check if row matches on startup (Repeating tables)

Copper Contributor

Hello,

 

I have two lists: Master and Sub. Master list has main information and Sub list has secondary info with collum MasterID which comes from Master list. How could I collect items from Sub list when ID = MasterID?

 

Set(
    varID,
    Value(Param("ID"))
);
If(
    varID <> 0,
    Set(
        varRecord,
        LookUp(
            MasterList,
            ID = varID
        )
    );
    If(
        Param("stage") = "Details",
        Navigate(Screen1_1)
    )
);
1 Reply
best response confirmed by LukasSliuzas (Copper Contributor)
Solution

@LukasSliuzas If you have multiple records in secondary list for a master record, use Filter function to get multiple records, like: 

 

If(
    !IsBlankOrError(varID) && varID > 0,
    Set(
        varRecords,
        Filter(
            MasterList,
            ID = varID
        )
    );
    If(
        Param("stage") = "Details",
        Navigate(Screen1_1)
    )
);

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

1 best response

Accepted Solutions
best response confirmed by LukasSliuzas (Copper Contributor)
Solution

@LukasSliuzas If you have multiple records in secondary list for a master record, use Filter function to get multiple records, like: 

 

If(
    !IsBlankOrError(varID) && varID > 0,
    Set(
        varRecords,
        Filter(
            MasterList,
            ID = varID
        )
    );
    If(
        Param("stage") = "Details",
        Navigate(Screen1_1)
    )
);

 


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

View solution in original post