I have an app with a Gallery that references a SP list (SP List 1), and forms that can be used to modify or add new items to that SP list. At the bottom of the "edit item" form that I created in the app, I have added another gallery that references related items from another SP list (SP List 2). I would like the filter the items in this gallery to show only SP List 2 items that are related to the SP List 1 item that the user is editing.
So, user selects item 1 of SP List 1. At the bottom of the form is a gallery of items from SP List 2 that pertain to the selected item in SP List 1 via a common key (i.e. Project ID =1, where there could be multiple items in SP List 2 that have been assigned Project ID = 1).
Getting the gallery to populate with items from SP List 2 is easy, but the filtering part is what I can't figure out. Does anyone know the code for such a gallery filter? Hopefully the ask makes sense and thank you for your time.