
Want to create a Custom Command Button in the main form on CANDIDATE table, to copy Qualified candidates in the open form in a model drivel app, to Team table, upon Command button click. This is in the modern commanding in Model driven Powerapps (Not a Canvas app). This is a Dataverse table to table copy.
Both source and target tables have the same named lookup column "Country", and each is a lookup to the COUNTRY table by respective Candidate_Country and Team_Country relationships.
What is the Patch() expression that copies the current lookup value in CANDIDATE.COUNTRY to TEAM.COUNTRY, keeping in mind that the button is operating in the context of an open form/ selected record, and disambiguation may be required, given identical lookup column names?
Been banging my head on a wall and appreciate the community's help. Running into what I think are disambiguation issues. I tried with no joy:
Patch (TEAM, Defaults(Team),
{Country : CANDIDATE[@Country]}
)
Also had issues using a Lookup() and /or with disambiguation. Read through a lot of documentation and I either can get a direct answer, or examples related to canvas app collections, sharepoint, etc. This is a dataverse to table to table copy using a custom modern command which will have this patch statement in it. When user presses this command in an open form in a model driven app, the open [selected] record should copy over.
See screenshot for example.
Thanks in advance!
-yz