Relative priority between lines

Hi Community!

I’m reaching out to discuss about the better way(s) to solve this problem:

  • I have a table for tasks (project management) with a duration column in days
  • I display the agenda for each people by computing a “start date” column that gets incremented based on all the previous tasks’ durations (I have a hidden column that does the sum of all durations where rowID < thisRow)
    –> Now, my issue is that I need to tell which task should go first, which one second etc. not based on rowID

So I was thinking an ideal way would be to have a view on the tasks, and simply order them by drag and dropping them up and down to define the relative priority between these tasks. This way everything can get computed in an orderly fashion, and that new very urgent “task 54” that just has been added can be dragged in first position so that the people whom it been assigned too will see it on top of his agenda.

Sadly, I couldn’t find anyway to do this. So now I’m slowly falling into despair by referring to “rowID” as a “priority” column, and adding 4 action columns (priority +1, -1, first, last) along with a “relative priority” column to store the needed shift based on rowID. And doing a lot of bookkeeping so that nothing messes up this relative priority. Along with cases where it actually fails (how to sort equal priority, and others).

Any thoughts would be appreciated. Perfectly working solutions even more :smiley: Thanks in advance :slight_smile:


Dear @Laurent_Auneau

Earlier today I saw a very thoughtful reply on another subject, where you made clear the differentiation of “thinking about the problem” and “thinking about the solution”

I few months ago I was playing around with an Eisenhower solution, but dropped it, because of… :thinking:

If it gives you some inspiration, it would be great.

Credits to: Amplenote

Hehe, thx Jean-Pierre :slight_smile:

We have such an automatic process already, but we’re aiming to let a human take the final decision on what should have a priority, especially when that process fails or doesn’t give optimal results for a given task.

So, well, since my post I’ve read a few threads on “ranking” and sorting such as this one, and that seems to be helping me on my initial solution. But I’m trying to reach a very highly ergonomic approach so that the human that’ll do the job can do it really very quickly, and thus I’m trying to find a way to do it visually. This post has hints on how to achieve this, but it seems I’m falling on the “undocumented / unreliable” side of Coda :frowning:

In the end I agree that even if my initial problem is on the display, maybe a better model could solve this entirely, for sure.

Thx for your doc, it showed me the “color coded column” that’s quite neat compared to conditional formating!


So, it seems .Find() function simply returns the view order of a line in a table. That would let me do this thing I wanna do, but I saw multiple warnings about that though. Am I missing something here?

Hey all,

so I keep replying to myself, but that’s because I’m making progress! It seems that the above formula I pasted a screenshot of … works just the way I wanted: with a simple drag a drop of a row, it gets a higher “rank” over the ones below.

But now, I have a second problem. Although this gives users an almost perfect way to adjust priority, I also need to be able to do a job of helping and not letting them do ALL of the work (we’re talking of an average of around 300 tasks in “waiting” or “in progress” status that need to be maintained, so manually moving them one by one will become quickly tedious). So, I’d like to be able to move chunks of rows with the press of a button. Is there any (hopefully documented) function that could let me “move” a bunch of rows up or down just as if I did it with a drag&drop?

Thanks in advance for all kind of suggestions if you think I’m going the right or the wrong way :slight_smile:


Dear @Laurent_Auneau

At least according my personal experience and I am open to other points of view:
Nevertheless the amount of tasks, they are always assigned to a project, a team and a task owner.

Depending on priorities of the project, available resources of the team / task owner the task priority needs to be adjusted. Between “waiting” and “in progress” I have learned to have an “triage” zone, a basked of tasks ( with limited amount of tasks) that can be taken from, things I learned from Klaus Leopold’s “Practical Kanban”

Concerning the tasks, next to that they are assigned to a project…
Tasks have mostly dependencies as you can see a sample in this post and when these dependencies are well settled, it shouldn’t be that big challenge to keep the workflow the project owner.

Very curious to learn from the input of others, mine is coming mostly from the production of garments and cosmetics and I know that the IT world is much more advanced.

Thanks for your answer Jean-Pierre :slight_smile:

The company has been around for 18 years, and I’ve tried that many project management strategies. We are indeed in the IT world, and one of our particularities may be that we are managing quite a big number of projects compared to our size (about 15 projects in parallel, for about 15 employees). We started “winning” in project management as soon as we moved to Agile without trying to actually implement SCRUM. So now that it works, I’m not really trying to find a new way to manage things, and thus changing the model is not what I’lm into at the moment (although of course all improvements are always welcome). As instance, dependencies of tasks in our world are really seldom, and the Gantt approach (with critical path) is really not working well (again, mostly due to the high number of project a given employee is working on at the same time).

So, back to the original topic: today, me and the product owner of the company are deciding each Monday the priorities so that we know altogether which tasks should be carried out this week. Problem is, even if we have a very clean list of tasks for everyone multiple months in advance, nobody gets a clear view of what’s actually going to be assigned the following week. As soon as I’ll have the “continuous” time issues solved (expect a revival of another older post coming soon), I’ll be able to give a planning view of each person in the company (as well as for each projet, we should be able to deduce if we’re going to be early or late). Changing the task priority would let use optimise that, and that’s really what I’m looking after. But if possible not manually one by one :slight_smile:

So, if you happen to know a way to programatically “move” tasks up and down in a table, I’d be really pleased! Thanks for your involvement in the community by the way.


Hi @Laurent_Auneau,

This template might help with scheduling tasks with dependencies. Curious what you think and if it ends up helping out…

Hey Ben,

thanks for your proposed answer. Sadly, it answers another question but not mine. I’m not trying to solve dependency, but rather basic priority between non dependant tasks. eg. if an employee has two tasks that are available, which one should we mark as higher priority so that he takes it first?

So the approach to simply drag & drop within the table works fine, I can very quickly define which task should go first, second, third, etc. My main issue is when I add in a new project, that may have something like 30 new tasks assigned 5 different people. When that happens, if that project is kinda urgent, I’ll need to place manually these tasks at the proper place, and most of the time, they go by bulks of 5. So right now, I need to grab a task from the bottom of the table (new tasks end up with lower priority), drag and drop it up afer scrolling a bit, and then scroll back down to grab the next one (repeat x30 total). I wish there was a way to take a bulk of tasks and programatically “move” them up 10 ranks.

Since a couple days I’m thinking I could build a linked list (creating a dependency between each and every task from the first that should be done, up to the last), but I’ll need to enforce consistency and do a big job of bookkeeping. That’s my last resort, meanwhile I’m still hoping someone will just tell me which function lets you change the position of a row in a table (should be something with splice, that I didn’t get the chance to test yet).

Thanks anyhow :wink:



I use Sort() for this exact purpose. It has both pros and cons.

But sort() outputs a sorted list, it doesn’t actually modify the existing data …

I might not understand your end goal and/or the existing data that you want modified.

If you have a table or view sorted on a “priority” column, you can enter (or programatically assign) a value to that column and the row(s) will automatically sort based on that value.

What is the exact data you want modified?

What I want are two things at the same time:

  • manually drag & drop rows up and down within a table, so that it defines a priority (or rank if you prefer). This is achieved by not sorting the table, and I can keep track of this rank with the formula rank<–find(thisRow). I think I could also access content by calling nth(rank) but didn’t try. It’s important to understand how ergonomic, visual and fast this way of sorting is when it’s needed to manually pick which one should be on top of which other.

  • be able to drag & drop multiple rows at the same time. Because although it’s perfect for a single row, or a few of them, it quickly becomes tedious when you need to move 10 or 30 of them. So I’d like to be able to find a function that I could call on a single row (I think it’s splice) that would change the value later outputted by Find()

Is that a bit more clear? I’ll end up publishing this whole solution at some point anyhow, as it’s a really neat way to do things.

I would also like this functionality. To my knowledge, we don’t yet have the ability to programatically change row position. Which is why for the time being, I settle for Sort(), as a less than perfect solution for rendering the result of programatically modified row priorities, in bulk.

I would be happy to learn otherwise!:grinning:

Hi @Laurent_Auneau,

This is a tricky one, if you sort a table then you can no longer manually sort the rows. If you don’t sort a table, then you’re stuck going to the bottom of the table each time to drag rows up.

One of my thoughts currently is to tag the rows that are important. Then in a new view, you can show only rows with this tag. So the rows will still be unsorted and you can sort them manually, but only those marked “important” will display, so it’s not quite as many to sift through.

If you have a button that completes a row, then you could also have it remove the tag. It is an extra step to go through and tag these rows, but with copy/paste, it might be a quick way to triage items, then sort more specifically after.

If you needed more tags, you could add more views as well.

Depending on how you choose which items are important and need to be bumped up on the list, you may be able to figure out search filters and a button to mark them as important for you. This all depends on your full setup though.

Hi Ben,

ah, at last, my personal support :slight_smile:
So, well yes, your solution actually works … more or less, I’ll give 50% of the points :smiley:

I was already thinking of “check boxes” in a new column to create a temporary group of rows to move, but your solution is doing the second part: adding the destination in that group, so that I can see only these checked rows and do the manual drag & drop quickly. I’ll still need to manually drag all of them, but at least I don’t have to scroll anymore!

But hey, I still didn’t test it, but can you confirm beforehand that a good old splice() wouldn’t do the job?

Thanks :slight_smile:


Splice() is a formula, so you’d still have to do something to mark rows to be picked up by the formula. I’m not sure if it would amount to being extra and not needed. I’m leaning away from formulas because manually moving the rows to order them appears to be the priority.

Oh, right :frowning:

But what about taking the whole table, adding that “checkbox” column, and having an extern “+1” button that moves all checked items one rank up (could also have another +5 button if the table gets too big)

There are keyboard shortcuts for this - you can select multiple rows and use Alt+Up or Alt+Down arrows to move the rows.

Not sure if that fully does what you want but at least it removes drag and drop and allows you to move multiple rows at once

1 Like