web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power apps- Edit form ...
Power Apps
Unanswered

Power apps- Edit form showing last created item after save current item

(0) ShareShare
ReportReport
Posted on by 66

Hi All,

 

I am working on a canvas power app  and implemented confirmation message box at form submit successful. For edit form, It has below logic-

1. User selects item from browse gallery.

2. Redirects to edit form by Select(Parent).

3. After save button click a message box displays and user clicks ok to close box.

4. It will show up display form with last edited item. 

 

Now i am facing strange behavior, last created item is slightly loading into edit form after current edit item saved. steps to reproduce - 

1. Select an item in browse gallery.

2. Click to view item/edit item icon

3. Fill form data --> Click to save

4. Message box displays 

Issue- In background of message box edit form is loading with last created item not currently edited one.

5. Once clicked ok--> Last created item shows in display form.

6. Data of edited item is saving perfectly.

 

But issue is only the switching of edit form data to last created item. 

 

Please help me.

Thanks & Regards

Amod

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    Hi @amodtiwari ,

    Can you please post (in Text - using Format Text in a text box if possible)

    • The Items and OnSelect of your Gallery
    • The Item of your Form
    • The code you are using to save

     

  • amodtiwari Profile Picture
    66 on at

    Hi,

    Thanks to looking in to it, sorry for late reply, i was too much stuck in some other issue so couldnt come back. 

    Please find below required details-

    Gallery-

    Items- 

    SortByColumns(Filter([@'MyList'], TextSearchBox1.Text in Lower('I (Donor Name)') || TextSearchBox1.Text in Lower(Status.Value) || TextSearchBox1.Text in Lower('Description of Treatment') ,Text(DatePicker1.SelectedDate,ShortDate)=Blank() Or Text(DatePicker1.SelectedDate,ShortDate)=Text(Created,ShortDate) || DatePicker1.SelectedDate>Created,TextSearchBox1_2.Text = Blank() Or TextSearchBox1_2.Text in Lower(Hospital),TextSearchBox1_3.Text=Blank() Or TextSearchBox1_3.Text in Lower('I (Donor Name)') && Today()-10< Created && 'Assigned To'.Email=User().Email), "Created", Descending)

    implemented search box and other filter options over created by email, submission date to select and one another text field say hospital. Search/filter  is working fine. 

     

    Gallery item has associated edit icon to edit particular item.

    Gallery Onselect -  false

    Edit icon onselect - Select(Parent);Navigate(Edit,ScreenTransition.Fade)

     

    Imtems property of edit form - 'MyList'

    Code used to save item - 

    If(IsBlank(DataCardValue1_1.Text)||IsBlank(DataCardValue2_1.Text)||!IsBlank(DataCardValue65.Selected.Value) && (DataCardValue65.Selected.Value="Granocyte"|| DataCardValue65.Selected.Value="Zarzio") &&
    (IsEmpty(DataCardValue20_1.Text) ||IsBlank(DataCardValue20_1.Text)||IsEmpty(DataCardValue21_1.Text)||IsBlank(DataCardValue21_1.Text)||IsEmpty(DataCardValue22_1.Text) ||IsBlank(DataCardValue22_1.Text)||IsBlank(DataCardValue66.SelectedDate)),Set(drugvalid1,true),If((DataCardValue27_1.Value && IsBlank(DataCardValue23.Text))||
    (DataCardValue28_1.Value && IsBlank(DataCardValue29_1.Text))||
    (DataCardValue31_1.Value && IsBlank(DataCardValue73.Text))||
    (DataCardValue30_1.Value && IsBlank(DataCardValue71.Text))||
    (DataCardValue44_1.Value && IsBlank(DataCardValue45_1.Text))||
    (DataCardValue44_1.Value && IsBlank(DataCardValue46_1.Text))||
    (DataCardValue47_1.Value && IsBlank(DataCardValue48_1.Text))||
    (DataCardValue51_1.Value && IsBlank(DataCardValue52_1.Text))||
    (DataCardValue51_1.Value && IsBlank(DataCardValue53_1.Text)),Set(showeditrequired,true),SubmitForm(EditForm))

     

    Made some custom validation messages to check required fields. 

     

    Although i found a case, if i remove search/filter from browse gallery , issue seems fixing but i cant remove search implementation its required. - just sharing if it can give a clue. 

     

    Please suggest.

     

    Thanks 

    Amod

  • amodtiwari Profile Picture
    66 on at

    Hi WarrenBelz,

    Good news !

    I got fix for the issue. There was a filter in browse gallery on created date and i changed it to modified and it worked for me. 

     

    Technically i dont have much explanation for it but yes, edit form was switching to top item in gallery after save current item and after a lot of research i thought if i can make current item as a top item in gallery it could resolve and modified filter did that.  

    It worked like a charm. 

     

    Thanks for time on this issue and bringing me on gallery code. 

     

    Best Regards

    Amod

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard