Hi all,
I am new to Powerapps en trying to build a few apps.
In one of my apps there is a BrowseGallery.
When I select an item in the gallery, I have the opportunity to change te record.
When I do this, my changes are only stored when I change one of the dropdowns (this dropdown contains the members of the Sharepoint-group). How can I solve this?
See below the code that is attached to the IconAccept1.Onselect event:
If(EditForm1.Mode=FormMode.New;
Patch(BronLeveranciersbeoordeling;
Defaults(BronLeveranciersbeoordeling);
{Title: DataCardValue5.Text;
Rating:Value(DataCardValue6.Text);
Medewerker: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
Claims:"i:0#.f|membership|" & Lower(LookUp(SharePointGroupMembers;displayName=ComboBox1.Selected.displayName).mail);
Department:"";
DisplayName: ComboBox1.Selected.displayName;
Email: "";
JobTitle: "";
Picture:"."}});
Patch(BronLeveranciersbeoordeling;
BrowseGallery1.Selected;
{Title: DataCardValue5.Text;
Rating:Value(DataCardValue6.Text);
Datum: DataCardValue7.SelectedDate;
Medewerker: {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser";
Claims:"i:0#.f|membership|" & Lower(LookUp(SharePointGroupMembers;displayName=ComboBox1.Selected.displayName).mail);
Department:"";
DisplayName: ComboBox1.Selected.displayName;
Email: "";
JobTitle: "";
Picture:"."}}))
;;
Navigate(BrowseScreen1;ScreenTransition.None)
before this code try
Reset(ComboBox1)
-
Thank you for your reply.
Unfortunately, this doesn't make a difference...
Hi @Dineke,
Have your solved your problem?
Do you want to save the form changes when gallery selected a special record in the edit mode?
Could you please tell me that how you set the Items and DefaultSelectedItems property of the ComboBox1?
I think the key to this issue is how you configure the ComboBox1.
From your description, I think the ComboBox1 could not reflect the corresponding value when you select a record from the Gallery, so you should set the DefaultSelectedItems to populate the ComboBox1 based on the Gallery.Selected.
Generally, if you set the ComboBox1 Items property as below Choices() formula, you should set the DefaultSelectedItems as the second ThisItem() formula
Choices(BronLeveranciersbeoordeling.Medewerker)
ThisItem.Medewerker
Go and check if this could help you.
Hi @v-qiaqi-msft ,
Thank you for your reply.
The problem is not solved yet.
This is how the properties were set:
Items:
SharePointGroupMembers.displayName
SharePointGroupMembers is a collection.
DefaultSelectedItem:
{Value:BrowseGallery1.Selected.Medewerker.DisplayName}
I changed it to what you suggested, but now Combobox1 doesn't contain any names.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
255 | |
119 | |
86 | |
84 | |
83 |