Hi all!
I had an issue... I have a form that is attached with a SharePoint list..the list have 5 People column... when I am submitting the form it's working fine.. but when I am editing these people field and select nothing it's not updating the list and showing the previously selected person(I want it to set as null as I am doing when editing the form... How do I make these combo boxes to select the null?
Enable this option in your app:
Then, in your Patch function:
Patch(
SPList,
Defaults(SPList),
{
PersonField: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Department: Blank(),
Claims: Blank(),
DisplayName: If(IsBlank(DataCardValue5.Selected), Blank(), DataCardValue5.Selected.DisplayName),
Email: Blank(),
JobTitle: Blank(),
Picture: Blank()
}
}
)
Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.
@Roverandom thanks for your reply... yea I had turn that on... Hmm, it seems to be a resolver, but I was concerned that Defaults() is used to add a new record, isn't it?
That's right. Use the LookUp function in place of Defaults to change an existing value.
Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.
I tried it but it's not setting it blank as the values in the Form are coming from my gallery when it is in edit mode, hence the field is prepopulated, it's not setting it blank and patching the previous value instead...
Hi @Rafia1 ,
Please try below method:
Patch(
SPList,
Gallery.Selected,
{
Field1:
If(
IsBlank(PeoplePicker1.Selected.Mail), Blank(),
{
Claims: "i:0#.f|membership|" & Lower(PeoplePicker1.Selected.Mail),
Department:"",
DisplayName: PeoplePicker1.Selected.DisplayName,
Email: PeoplePicker1.Selected.Mail,
JobTitle:"",
Picture: ""
}
),
Field2:
If(
IsBlank(PeoplePicker2.Selected.Mail), Blank(),
{
Claims: "i:0#.f|membership|" & Lower(PeoplePicker2.Selected.Mail),
Department:"",
DisplayName: PeoplePicker2.Selected.DisplayName,
Email: PeoplePicker2.Selected.Mail,
JobTitle:"",
Picture: ""
}
)
}
)
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
User | Count |
---|---|
261 | |
128 | |
99 | |
48 | |
47 |