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.
Thanks in advance
Solved! Go to Solution.
Hi @Station1901 ,
Sorry I am a bit lost here - I thought you were just adding one to the current highest number
First( Sort( CarList, PriorityNo, Descending ) )+1
What else are you trying to do?
@WarrenBelz That is what I am trying to achieve. When a job is issued to a vehicle I press a button next to that vehicle number which patches the job details to my Sharepoint list. I'd like the PriorityNo number to update at this point as well but I'm just not sure how to do it?
If, for example vehicle number 2 already has a priorityNo of 189 how can I update its priority number to 190 using the patch function - sort of an incremental rise.
So would this not put the number the same as another car unless you update the lot? Sorry I do not have my mind around this yet.
Currently you have all the cars in priority order with the most recently used having the highest number. This list will escalate upwards ongoing with car used going to the top.
@WarrenBelz Id like to just give the vehicle a unique PriorityNo if possible so that it pushes the car to the back of the queue and using your MIN function I can then return it's queue position.
The thing I'm trying to achieve at the moment is to give a vehicle a unique PriorityNo that will push it to the back of the queue. Is there a way of locating the highest PriorityNo in the sharepoint list and then +1 ?
Hi @Station1901 ,
The problem with this is you will run our of numbers at zero?
If you had a second column however you could use the
ThisItem.PriorityNo - Min(Carlist,PriorityNo)
Max(Carlist,PriorityNo) - ThisItem.PriorityNo
to set exactly where it is.
@WarrenBelz Sorry I'm not very clued up with Powerapps, I'm a beginner. Would I enter the code / formula below into a calculated column in the Sharepoint list?
Hi @Station1901 ,
I am suggesting you make a new column in SharePoint to hold this.
You would Patch this as the value of the new column with the same syntax as your other Patch.
Do not use calculated columns in SharePoint unless you are also working in SharePoint - they do not interact with Power Apps very well.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.