I have a form and a gallery on the same screen. The form is linked to a SharePoint List. The gallery is linked to a SharePoint Document Library.
The SharePoint List has lots of fields but the two relevant here are the 'Title' column and the 'DocID' column. Both of these appear as fields on the powerapp form.
When the form is in FormMode.New I am using the gallery to select from all the documents within Shared Documents, and with that selection, populate the forms Title field with the documents 'Name' and the forms DocID field with that document 'ID'. When I hit the submit button this adds a new item to my SharePoint list (there are other unrelated bit of information that also go in other columns). This is working fine.
When the form is in FormMode.Edit I need the Gallery to automatically select the document from all the documents within the Shared Document library that has the same ID (as was stored in DocID column of the SharePoint List) or the same Name (as stored in the title column of that list)
In the example above I was just trying to filter to ID = 451 to see if I could actually return an item within the Gallery, really, I want to by able to dynamically match to the item being edited e.g.
Name = DataCardValue6.Text or (DataCardValue6 being the Text entry field for that datacard)
ID = Value(DataCardValue8.Text (DataCardValue8 being the Number entry field for that datacard)
Hopefully that makes sense!