Hi All,
I'm attempting to update a record in a table that relies on a parent/child relationship by selecting the parent record through a gallery.
In my screen, I have my 'EngagementsGallery' that presents the data in the parent table (Engagements Table) about an engagement, including the engagement name. I then have another table that returns other data about the engagement (The Scoping Table), and therefore have a relationship from the Scoping Table to the Engagemen Table using the Engagement Name.
I want to be able to click on a record in the EngagementsGallery using EngagementsGallery.Selected.Name which selects the engagement name, then update the data in the Scoping Table using some kind of patch formula. At the moment I'm using the 'OnVisible' Property of the new screen to set variables, but I get an 'Invalid Argument Type' error because it identifies the SelectedEngagement Variable as text, but the Name in the scoping table is a lookup data type as it is the column I have used to setup the relationship between the two tables, which is causing the invalid argument type. I've included the code excerpt below.
Set(SelectedEngagement, EngagementsGallery.Selected.Name);
Set(VariableTest, First(Filter('Risk & Scoping Informations', 'Risk & Scoping Informations'.'Engagement Team' = SelectedEngagement)))
Any help would be greatly appreciated!
Many thanks