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 / clicking on radio butt...
Power Apps
Answered

clicking on radio button but change order of data list in browser gallery

(0) ShareShare
ReportReport
Posted on by 3

I am new in using Powerapps and want to create an apps to take attendance for student. I put an excel which contains student information in onedrive and begin with created apps by data. If the radio button is onclicked, the column of that student attendance in excel student will mark as present or absent automatically. However, the browsergallery change the student order automatically everytime when click on radio button.

 

 

If click on Anna Absent button, The position of Anna go behind Cat. The button keep showing Present but excel update correctly.  I want to keep the student order same as in excel without any movement change. What is the problem and how can I fix it? Thanks.

 

p1.PNGp2.PNGp4.PNGp5.PNG

 

 

Categories:
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @emilyyip33 ,

    The reason why you met the problem is that you sort the table based on attendance.

    When you change the attendance's value, the order will change automatically.

    So I suggest you not sort the table based on attendance.

    Could you tell me what order way that you want ? ( just as the original table is not a rule)

    I suggest you two ways:

    1)order based on student name's alphabet

    SortByColumns(Search(.....),"studentname")

    2)order based on created time

    SortByColumns(Search(.....),"created")

    I also figure out another way.

    If you want the gallery display in order of original data and still want to sort based on Attendance, you could make the gallery display collection and update the data source data.

    For example:

    1)

    ClearCollect(test,tablename) //save data in table to collection named test

    2)set the gallery's Items:

    SortByColumns(Search(test,.....),"attendance",....) //make the gallery display the collection's Items

    3)set the button's OnSelect:

    If(....,Patch(tablename,ID=ThisItem.ID,{Attendance:....}),Patch(tablename,ID=ThisItem.ID,{Attendance:....})) //update the table's data

    Then, even if you update the table's data, the gallery will still display the collection's data( table's original data) ,so the order will not change.

     

     

     

    Best regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard