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
Solved! Go to Solution.
Yes - I proved that (or at least my idea on it) in my earlier post - I will put it below again.
As the numbers will be sequential, you can find the position with the Min() or Max() functions. 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.
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.
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
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.
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.
Hi,
I have tried this but PriorityNo is not recognised?
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.
Hello, The PositionColumn is not recognised???
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.
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
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
190 | |
53 | |
51 | |
36 | |
33 |
User | Count |
---|---|
268 | |
95 | |
80 | |
68 | |
67 |