cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Finding out a queue position

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

27 REPLIES 27

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.

@Station1901 ,

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)

OR

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.

 

Thanks @WarrenBelz I'll give it a go

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (55,127)