Forum Discussion

LukasSliuzas's avatar
LukasSliuzas
Copper Contributor
Apr 05, 2022

Check if row matches on startup (Repeating tables)

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)
    )
);
  • 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.

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