Can we translate the ranking number to a normal number?

Hi,

What we are trying to achieve is the following:

  • We have a list with entities
  • We want ‘normal numbers’ in the #Volgorde field
  • So first entity is 1, last entity is 12
  • If an entity is added or removed, then also update that number

So via script we received the ranking number. But what is the next step to translate that ranking number to the ‘ranking field’ (so numbers 0 - 12?) :sweat_smile:

End goal: in automations we want to use that ranking number to determine if we should update the lead status of a contact yes/no. So ‘everything <5, do update, everything >= 5, don’t update’ for example.

Our clients will only see this list :arrow_down:

Would be awesome if the number will be changed if a user adds or moves a entity within that list.

It’s pretty challenging to update all the relevant Volgorde numbers when a single entity’s position in a list is changed.
Imagine you have a list A, B, C, D, E, etc. and entity E is moved from 5th position to 2nd position. The Volgorde number for E goes from 5 to 2, for A it is unchanged, and for all other entities in the database, it should be increased by one.

I can’t think of any simple way of doing this.

Similarly, what happens if an entity is created/deleted, causing the relative positions of other entities to change?

Most importantly, I am not aware of any trigger you could define that would cause an automation to run when items are reordered in a list view, so I have no idea where to start.

You would need to use javascript to recreate the value of the Volgorde field for every entity in the collection.

As @Chr1sG noted, the problem is that there is no script trigger for “entity changed order” (i.e. when you manually drag the items in a List view). So you would have to trigger the script manually with a button, or on a timer.

True. Thanks @Matt_Blais and @Chr1sG. I also don’t see a good trigger that makes sense for a user :see_no_evil: