Reports: My "State Ranks" changed…

A while ago I’ve made a status report.

Seems like in reports the Workflow State fields only can utilise something called “State Rank” which is some kind of assigned integer (?). Not great.

Here a filter:
2023-09-28 at 14.00

Now, it looks like the number that had been assigned to the State Rank was changed to negative and other random numbers?

2023-09-28 at 13.57

Is this something I can expect to happen more often? Is there any plans to actually support the same states as in the entity or at least allow me to see in the state field the actual ranks?

Thanks!

Not sure what you mean. For any db with the workflow field enabled, there should be a State field parameter accessible in report view:
image

Rank is a global value, affected by entity re-ordering, and gets recalculated regularly, so the absolute value shouldn’t be relied upon. It can sometimes be useful when making comparisons.

Oh, sorry, @Chr1sG, that wasn’t really clear, lemme try again. :slightly_smiling_face:

  1. I have a CRM where I track customers and their status of onboarding (using the Workflow field)

  2. I made a little report that tracks total customers in the CRM and how many of them are “activated”

As we can see, my Register in X Workflow state translates to a State Rank of -2015332743211050 in the data, which is arbitrary in the worst sense of its meaning…

Here are the current State Ranks in that database:
2023-09-28 at 16.24

… before they were at least round positive numbers (i.e. 1 000 000, 2 000 000, etc.).

Until yesterday (or so), the formula to count all activated customers was what my first screenshot shows:
COUNTIF([Id],[State Rank] > 3000000)

Today my colleague noticed that the number of activated customers was zero, and when I checked, I saw the the State Rank field suddenly has new values. So I had to change the formula to this:
COUNTIF([Id],[State Rank] <= -1922380244664780.2)

Pretty. :wink:

TL;DR:

  1. Why is State Rank in a report an arbitrary number that can change? I understand that it is is needed to be a number for sorting, but it shouldn’t change. → I would suggest to split ID and sorting, so that the ID can be immutable and the sorting can be changed.
  2. Why is the State Rank not something I can see when I alt+click the single select option, where I can give it extra properties? Listing it there would make it easier to use, tho Ideally I’d want:
  3. Why is the State Name not be made available in reports?
  4. Why does the State Rank get changed without me touching the options in the workflow properly?

Rank is a property that every entity in the workspace has. Its value is a relative number indicating a global ordering.
Here’s a superficial explanation of how it works:

Imagine I have two projects, four tasks, and a single select (workflow) field with three options.

They might have rank values as follows

Item Rank value
Project A 100
Task 4 200
Open 300
Task 1 400
Task 3 500
Done 600
Project B 700
In progress 800
Task 2 900

In other words, if you were to show Tasks on a board, they would be sorted as Task 4, Task 1, Task 3, Task 2.
If you show Projects, they would be ordered Project A, Project B.
The options for the select field are Open, Done, In progress.

Imagine you add a new Task and drag it in between Task1 and Task 3. The new rank values will look like this:

Item Rank value
Project A 100
Task 4 200
Open 300
Task 1 400
Task 5 450
Task 3 500
Done 600
Project B 700
In progress 800
Task 2 900

that is to say, the new item is given a rank value halfway between the other two.

As you add new items (of any type) and as you drag items around, you will be assigning new rank values each time.
So imagine you now add a 6th task between Task 1 and Task 5 (it gets the number 425) and then you add one between Task 1 and Task 6, and so on.
Eventually as you add/change a lot of stuff, there would become no more space to fit new items in between existing ones.

Before this happens, Fibery does a ‘clean up’ in the background which involves updating all entities’ rank values, thereby creating extra space between them (without changing the overall order). This is how the rank value of an entity can change without you doing anything.

Rank is not an editable field, it can’t be used in formulas/automations, and most users don’t even know it exists, so there’s not much point in showing it on the GUI.
The absolute value of rank is not really meaningful/useful.
Rather, the relative value is what matters, and it is commonly used just as the sorting field in a report view.

It absolutely is. That was what my screen shot above was showing.
If you choose the data field called State you will get the state name.
image

If you do want to filter out specific states, you can filter on the State field, e.g.
COUNTIF([Id],[State] == 'Activated')

My deepest apologies, @Chr1sG, I did not realise

  1. That I had to add the field
  2. I had to change the field from ID to Text

2023-09-28 at 18.48

It now all makes sense. Of course I should not use the State Rank, if I have the actual State. :man_facepalming:

Not sure why I didn’t see that field to start with.

Thanks!

The field should normally be there when the report is first configured, but may have been removed if you chose ‘Remove redundant fields’ at some point in the past.

1 Like

Ah, that explains :slightly_smiling_face:
Thanks!