Hi guys,
I have been struggling a while with this problem and can't solve it or find anyone else's solution fixing my problem.
I have a Canvas App with dataverse.
I have the Tables Execution (CT) where I want create a new row and patch to different columns. It has a Lookup column to the related table (Requirement (CT) ).
The lookup column is called Lookup_Requirement (CT) in the Execution table and goes to the primary column called Description in the Requirement table.
I have a Gallery (Gallery4) where I have a text label (Label5) where it displays the Description from the Requirement table.
It works to create a new row and to patch text values to different columns, but I can't seem to get the lookup column or the choice column to work. I tried various different things and I don't remember all to list here.
This is my code of the latest try, where I get the error: Invalid argument type. Expecting a Record value, but of a different schema. Which I don't understand.
If(
IsBlank(
LookUp('Execution (CT)S', 'Lookup_Requirement (CT)'.Description = Gallery4.Selected.Description)
),
Patch(
'Execution (CT)S',
Defaults('Execution (CT)S'),
{
Executor: "Hello",
Controlnr: "kjk",
'Lookup_Requirement (CT)': LookUp(Requirement (CT), Description = Lable5.Text).Description
}
),
Notify("A row for this requirement already exists.", NotificationType.Information)
);
I appreciate any help