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 / Finding out a queue po...
Power Apps
Answered

Finding out a queue position

(0) ShareShare
ReportReport
Posted on by 209

Hello,

I have a sharepoint list which has a list of fleet vehicles which we issue jobs to and a powerapp that controls this.  When a job is issued to a vehicle that vehicle is then moved to the last place in the queue and starts to move back up as jobs are issued to other vehicles.  This all works very well and I am extremely happy with how the powerapp controls all of this, however...

We have drivers ringing in and asking where there vehicle is on the job list and it is a real struggle to search through the list and count where they are to find their queue position as we have over 200 vehicles.

Is there a way I can use a lookup function (or something similar) so that i can enter the vehicles reg and it will return the sharepoint row number? I know there is the ID function but the row position will continually change as jobs are issued to vehicles on the list.

HEEELLLLPPP !!!

Thanks in advance

Categories:
  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    Hi @Station1901 ,

    It should actually be fairly simple.

    Firstly have a numeric field in the list - I will call it PriorityNo for the purposes of this and your list CarList.

    Each time a vehicle is used, assign the PriorityNo the highest number existing +1

    First(
     Sort( 
     CarList,
     PriorityNo,
     Descending
     )
    )+1
    

    then your gallery will simply be

    Sort(
     CarList,
     PriorityNo,
     Asccending
    )

    The car used the first will be on top.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Station1901 Profile Picture
    209 on at

    Thanks for getting back to me.  I do have a gallery which shows the position of the vehicles by date order (date the job was issued). which is fine but as the fleet grows I need to be able to enter either the Vehicles unique fleet number or Registration into a text box and then the Vehicles position in the queue will be displayed in a label next to the text box.  I'm really stumped

  • eka24 Profile Picture
    20,925 on at

    Insert a TextBox1 which user will type the Reg Number.

    Option1

    To know the position, insert another Textbox which will LookUp the position row. In the default of the Textbox put:

      LookUp(SPList,RegNumber=TextBox1.Text,PositionColumn)

     

    Option2

    Insert a Combobox1 where user will type the Reg Number.

    To know the position, insert another Textbox which will LookUp the position row. In the default of the Textbox put:

      LookUp(SPList,RegNumber=Combobox1.Selected,PositionColumn)

     

    Since combobox allowes searching, option 2 is better

     

    Please alter the SPList and column names to yours.

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

     

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    OK @Station1901 ,

    As the numbers will be sequential, you can find the position with the Min() function. Note that this is not Delegable, but 200 vehicles will be OK. So the position is 

    ThisItem.PriorityNo - Min(Carlist,PriorityNo)

    This shows how far up the queue it is - OR

    Max(Carlist,PriorityNo) - ThisItem.PriorityNo

    how far from the top.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Station1901 Profile Picture
    209 on at

    Hi,

    I have tried this but PriorityNo is not recognised?

  • WarrenBelz Profile Picture
    156,940 Most Valuable Professional on at

    @Station1901 ,

    I simply gave it that name as an example (as noted in my post), you will need to create the field in your table and if you call it something else, change the name (same as I called your List CarList).

    The code will work as long as you have this field with numbers in it.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Station1901 Profile Picture
    209 on at

    Hello, The PositionColumn is not recognised???

  • eka24 Profile Picture
    20,925 on at

    PositionColumn is a test column I used. Replace the name with the column you want to see after user enters registration number.

     

    If the Name is "ABC", change it to ABC

     

    That is what is the name of the column which contains row you are looking for. Use that instead of PositionColumn 

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Station1901 Profile Picture
    209 on at

    thanks again, I believe you solution would work but wont it return a larger number each time?.  I simply want to find out which row number the Vehicle is in.  The list is sorted by date job issued so the longest waiting vehicle is always top.  I just want someone to be able to type or select a reg number and the power app tell me which row number that vehicle is in

  • eka24 Profile Picture
    20,925 on at
    The formula is exactly what you need. Can you provide a sample table so I can send you a screenshot after I do it.

    You can provide typical example like if I select A then 123 should appear from your table

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