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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / why my page auto refre...
Power Apps
Answered

why my page auto refresh data from collection

(0) ShareShare
ReportReport
Posted on by 267

In my datatable has two record and the item come from collection “ opselectcasedata"

 

JACK_LAI_1117_0-1623650309561.png

 

After user click “request id “ then will navigate to another page

 

JACK_LAI_1117_1-1623650363996.png

 

The user can modify any item data , like “reason request” or “vat type” …….then user will click “Save “ button then navigate to previous page .

 

After click “Save “ , weird things happened …….the page will transfer show first record in that collection .

 

This is the code in my “Save” button , so what’s wrong with my code ??

JACK_LAI_1117_2-1623650384234.png

JACK_LAI_1117_3-1623650393963.png

JACK_LAI_1117_4-1623650404143.png

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @JACK_LAI_1117 ,

    I guess all your controls in the second screen had Default property set to Gallery.Selected. .....

    When you modify the source (collection) of the Gallery, the gallery itself resets to show you the new values (even this is happen in another screen). Or after reset the default selected item of a gallery is the first item. That's why all your controls from the second screen shows the values of the first item of collection.  

    To solved it use a global variable:

    Gallery.OnSelect -> Set(itemSelected, LookUp(opselectcasedata,requestID=Gallery.Selected.requestID))

     

    In Default property of the second screen use itemSelected instead on Gallery.Selected.

    And finally add to Save button -> OnSelect after your code:

    Set(itemSelected, LookUp(opselectcasedata,requestID=itemSelected.RequestID))

     

    Hope it helps !

     

  • JACK_LAI_1117 Profile Picture
    267 on at

    @gabibalaban 

     

    Yes , all the second page the default property is to to gallery.selected.....

     

    So I will modify my code to use your method .

     

    Thank you very much ~~

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard