Hi @mgisbert ,
Recollect Data: After the Power Automate flow runs successfully, you can re-collect the user data into a collection which the gallery uses as its data source. This forces the app to fetch the latest details.
ClearCollect(UserDetailsCollection, Office365Users.UserProfile(Gallery1.Selected.Id));
Update Context: Use the UpdateContext function to update a variable that will trigger the gallery to refresh its data.
UpdateContext({varLastRefresh: Now()});
Create a button that, when clicked, fetches the updated user data for the selected user.
Button.OnSelect = Collect(UserDetailsCollection, Office365Users.UserProfile(Gallery1.Selected.Id))
Have the Power Automate flow return the updated user details, and use those details to update the collection that feeds the gallery.
Set(result, 'UPM|ModifyUser'.Run(Gallery1.Selected.Id, DisplayNameInput.Text));
If(result.response = "success",
(
Notify("User modified.", NotificationType.Success);
// Assume result.userDetails is the updated data returned by the flow
UpdateIf(UserDetailsCollection, Id = Gallery1.Selected.Id, result.userDetails)
),
Notify("Error occurred while trying to modify user.", NotificationType.Error)
);
If this answer helps you with your Power Apps issue, please consider accepting it. 😊