Best Way to Manage a Queue

Fellow community members,

In your experience, what is the best way to manage an ever-changing job queue? That is, a list of jobs that are in order of priority. My challenge: job priority will change regularly (for example, managing a list of 100 jobs and one must be bumped up to the top or bumped down a few rows). How can I control the order of a queue in the UX?

Help appreciated

Jesse,

I would create an additional column in your job table that holds the priority value. Something like 1 being high priority, 2 medium, 3 low. Then you can sort your table view by that column. Then you can create a couple actions to easily increment or decrement those values to adjust the priorities.

If you need finer control of priority ordering, you’ll need more than 3 priority values.

Thanks Marc. How would you work around the issue with having two rows with the same priority value? For example, let’s say I move #1 to #2 - I would then also have to move #2 to #1. Editing two rows doesn’t feel like a natural way of sorting.

@Jesse Sort based on two columns: First by the aforementioned ‘Priority’ value, second by a ChangeTimeStamp column which only updates when the priority column is updated…

There still is some odd behaviours here, such as the following example:

Coffee - P5
Orange - P4
Banana - P4
Carrot - P3

If you want to rank Carrot in between Orange and Banana, you could not just rank up Carrot to P4. This would sort it between Coffee and Orange.

You could, however, rank down Banana.

Also, ranking down Orange would but it between Banana and Carrot, not necessarily to the bottom To get Orange to the bottom you would have to first rank it down, then rank down Carrot…

I’m sure theres a way to achieve a more intuitive behaviour, but it will take some thought.

Found a somewhat-solution… Here is a demo video, and there is a sample app at the bottom of this post…

Some issues with this solution:

  • You can rack up a sync queue very quickly by flipping things around. Users need to understand the consequences of this.
  • Repeatedly swapping two items back and forth causes their priority values converge (as seen at the end of the video). Eventually they will converge and some wackiness will occur (one item will jump down two spaces, rather than the intended single space).
    • You could probably check for this by making the action button formulas even more unweildly :sweat_smile:.
    • Alternatively, you could add more precision/decimals to the priority column which will at least make it take longer for the values to converge.

In any case, maybe this will work for you. To do this, you require an additional column, and two actions:

Column: 'priority’

  • Type: Decimal, with precision of at least 3
  • Initial Value: Depending on the behaviour you want… You could have it prepopulate with the maximum priority value of other columns, in effect making new items the highest priority.

Action: 'item_rankup’

IF(COUNT(SELECT(table[priority],[priority]>[_THISROW].[priority]))<2,
   IF(COUNT(SELECT(table[priority],[priority]>[_THISROW].[priority]))=0,
      [priority],
      ANY(SELECT(table[priority],[priority]>[_THISROW].[priority]))+1
   ),
   (INDEX(SORT(SELECT(table[priority],[priority]>[_THISROW].[priority])),1)+
   INDEX(SORT(SELECT(table[priority],[priority]>[_THISROW].[priority])),2))/2
)

Action: 'item_rankdown’

IF(COUNT(SELECT(table[priority],[priority]<[_THISROW].[priority]))<2,
   IF(COUNT(SELECT(table[priority],[priority]<[_THISROW].[priority]))=0,
      [priority],
      ANY(SELECT(table[priority],[priority]<[_THISROW].[priority]))-1
   ),
   (INDEX(SORT(SELECT(table[priority],[priority]<[_THISROW].[priority]),TRUE),1)+
   INDEX(SORT(SELECT(table[priority],[priority]<[_THISROW].[priority]),TRUE),2))/2
)
1 Like

Thank you so much for your insight and time.

I ended up opting for a simple subpar solution using quickedit and SOME automation with workflows to automatically put items at the end of the queue.

I think managing a queue is something appsheet could solve on a platform level. There needs to be some functionality built right into the app for this.