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 / Users see a different ...
Power Apps
Unanswered

Users see a different order than I do

(0) ShareShare
ReportReport
Posted on by 361 Super User 2024 Season 1

Hi All.

 

Recently I've made an app to display current and upcoming birthdays and employment anniversaries.

However I've noticed that I am getting the correct order while my co-workers are getting a seemingly random order - nevertheless they see the same order as the other co-worker (I checked with 2 of them)

 

In a bird's eye view this is the app and how it works.. i'll just detail out birthdays (since anniversaries works the same way - the problem will likely be the same aswel)

the_dude_0-1696335471319.png

 

 

Strange thing is, both my co-workers see the exact same order which doesn't make sense to me - if it were to be random why are they seeing the same?

 

How this works:

 

The Datasource list:

the_dude_1-1696335604255.png

 

 

It get's stored into a collection on app OnStart() like this:

 

 

 

ClearCollect(
 UpcomingBirthdaysThisYear,
 Sort(
 Filter(
 Medewerkers_Lijst, 
 DateValue(Text(Month(Geboortedatum), "00") & "/" & Text(Day(Geboortedatum), "00") & "/" & Text(Today(), "yyyy")) > Today()
 ),
 DateValue(Text(Month(Geboortedatum), "00") & "/" & Text(Day(Geboortedatum), "00") & "/" & Text(Today(), "yyyy"))
 )
);

ClearCollect(
 UpcomingBirthdaysNextYear,
 Sort(
 Filter(
 Medewerkers_Lijst, 
 DateValue(Text(Month(Geboortedatum), "00") & "/" & Text(Day(Geboortedatum), "00") & "/" & Text(Today(), "yyyy")) < Today()
 ),
 DateValue(Text(Month(Geboortedatum), "00") & "/" & Text(Day(Geboortedatum), "00") & "/" & Text(Year(Today() + 1), "yyyy"))
 )
);

ClearCollect(
 AllUpcomingBirthdays,
 UpcomingBirthdaysThisYear,
 UpcomingBirthdaysNextYear
);

 

 

 

Shortly put the code takes first all the birthdays that are yet to happen this year sorted first upcoming to last upcoming + birthdays coming up next year sorted first upcoming to last upcoming and stores those 2 collections into a new collection.

 

The first thing that came to my mind was to check whether the newest version of the app is live - and that is the case.

 

If anyone has any idea what could be the cause of this i'd greatly appreciate any input!!

 

Kind Regards

 

Categories:
  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    update:

     

    In the mean time I have given it much thought but yet haven't figured it out.

    I thought perhaps it has to do with permissions on the underlying list(items) in SharePoint. Though  ''K  29-10-1996" is accessible to all my coworkers just as "M 11-11-1994" is.   So I can't imagine permissions being an issue. 

     

    If anyone has any other suggestions for directions to look into I'd greatly appreciate it..

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    update 2:

     

    I've added a button to manually refresh the data and re-ClearCollect the collection(s) aswel as a debug screen where the entire collection can be viewed in a gallery -  the refresh doesn't help at all and the debug screen shows the same strange order  though showing all our employees again ruling out access permission to certain list items.

     

    Also, I've used a 2nd account I got access too to check - it sees the correct order.  Which made me think perhaps it is because I am using Microsoft Edge and my co-workers use Google Chrome - though after a check by my coworker with Edge this is also ruled out.

     

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    I've noticed that for my co-workers it seems to be sorted on the birthday but strangely.

    As you can see in the picture below it goes  11/11 ->  12/12 - > 13/05  ->  13/11  -> 14/04 and so in. it seems sorted on the day first and the month second.   

    the_dude_0-1696427098254.png

     

    but why does this not happen on my account(s) and why does this happen to my co-workers? im completely puzzled

     

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    another update.

     

    I think it has to do with the data in the collection possibly being text and not a datetime.  When testing on my phone with the powerapps app (with the same account i use on the pc) i get the strange order of people aswel.

     

    I'm going to add 2 columns to contain numbers and a flow that will select the first 6 upcoming dates for each category and fill out the new columns based on that so i can simply connect the app to the list directly and sort on that.

     

    Because i've tried adding a new column on the fly with ascending numbers and sort on that but i couldnt manage to do it due to restrictions (mainly cant set a variable inside a forall)

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @the_dude ,

     

    If Geboortedatum is a datetime column, you could try:

     

     

    ClearCollect(
     UpcomingBirthdaysThisYear,
     Sort(
     Filter(
     Medewerkers_Lijst, 
     Geboortedatum > Today()
     ),
     Geboortedatum
     )
    );

     

     

    Best Regards,

    Bof

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    Hi @v-bofeng-msft 

     

    Unfortunately that is not going to work.

    Geboortedatum (translation: Birthday) is a dd-mm-yyyy  so all of them will be in the pass and thus will never be greater than today().

     

    Kind Regards

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    I've gotten a step closer however I'm still facing what I call the 'new years issue'.

     

    I added a column (BdayInt) which contains integer value monthmonthdayday  (for example 0401 for april 1st). 

    Now I can simply use this code to get all upcoming birthdays:

     

    OnStart code:

    ClearCollect(
     FilteredMedewerkers,
     Filter(
     Medewerkers_Lijst, 
     Value(BdayInt) > Value(Text(Today(), "mmdd"))
     )
    )

     

    Gallery Item Property:

    Sort(FilteredMedewerkers,BdayInt)

     

    This way I see all upcoming birthdays until the end of the year.

    However this still leaves me with the issue that for example: imagine that it's December 29th and there are no more birthdays this year - it will not show birthdays upcoming in January.

     

    If anyone has any idea how I could fix this I would greatly appreciate any input !!

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @the_dude ,

     

    I've made a test for your reference:

    vbofengmsft_0-1697793957971.png

    vbofengmsft_1-1697793979699.png

    Sort(
     Medewerkers_Lijst,
     If(
     Value(Text(Geboortedatum,"mmdd"))<Value(Text(Today(),"mmdd")),
     Value(Text(Geboortedatum,"mmdd"))+100000,
     Value(Text(Geboortedatum,"mmdd"))
     )
    )

     

    Best Regards,

    Bof

     

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 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard