Im trying to update a existing record using htis formula but when I try it it say comment udpated but it remved the comment and I cant see the new updated comment. Im trying to first check that the user who has made comment can only change. The below code is is for submit button of update form. The writebackcomment is the sharepoint list file.
you can try adding a Refresh to the later part of the true statement to refresh your list in the app:
If(
selectedComment.USERNAME = User().FullName,
Patch(
Writebackcomments,
selectedComment,
{
COMMENTS: Inputcpmments.Text,
DATE: Now()
}
);
Notify("Comment updated successfully.", NotificationType.Success);
Refresh(Writebackcomments);
Navigate(Screen1, ScreenTransition.None),
Notify("You are not the author of this comment.", NotificationType.Error)
)
What you are doing currently its completely replacing the selected comment with the new text input in the application and this will make changes in the SharePoint lust but this hasn’t yet been refreshed and pullback down to you app.
Hope this helps
Please click Accept as solution if my post helped you solve your issue. ✔️ This will help others find the solution to this problem. It also closes the item. Remember, you can accept more than one post as a solution.
If the content was useful in other ways, please consider giving it Thumbs Up. 👍
Thanks
Andrew
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional