Hi,
I've been going over this for a while now and it's driving me crazy
My best guess is that there is something I'm doing wrong with my If-statements here.
Scenario: I have a SP-list with two people/person field inside it.
In powerapps I show that list in a gallery and you can navigate to each single record on a screen to make edits to it.
After you make edits and hit the save icon it runs a collection, then it Patches that collection with ShowColumns.
However, everytime I have to make changes to both of the person fields to make any changes go through.
For instance if you add one name at one point and then go back to it you cant just add the other name, you have to delete the already added name, add it again and then add the new one. Otherwise it wont go through.
Same thing happens if you have two names and you wish to delete one of them, you have to delete both names and add the one you want to keep in order to delete the one name.
My best guess here is that there is something wrong with my If-statments in the collection
ClearCollect(
LVToNew3,
{
RN: If(
IsBlank(CBRegion.Selected.DisplayName),
Blank(),
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & CBRegion.Selected.Mail,
Department: "",
DisplayName: CBRegion.Selected.DisplayName,
Email: CBRegion.Selected.Mail,
JobTitle: "",
Picture: ""
}
),
Ansvarig: If(
IsBlank(CBRegion_1.Selected.DisplayName),
Blank(),
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & CBRegion_1.Selected.Mail,
Department: "",
DisplayName: CBRegion.Selected.DisplayName,
Email: CBRegion_1.Selected.Mail,
JobTitle: "",
Picture: ""
}
),
Telnr: TextInput3.Text,
Regi: TextInput3_1.Text,
Ansvar: TextInput3_2.Text,
Epost: TextInput3_3.Text,
ID: varLV.ID
}
);
Patch(
Lokalvard,
ShowColumns(
LVToNew3,
"RN",
"Ansvarig",
"Telnr",
"Regi",
"Ansvar",
"Epost",
"ID"
)
)
I have Formula lever error managment turned on, so I can patch Blank, but only if I make changes to both of the person fields.
Can anyone tell me what I'm doing wrong here?