Sort Entity drop-down lists by public ID?

I tend to use entity relations instead of single-select fields (because i cannot figure out how to use them in formulas). For instance, i want to assign priorities to Tasks and i do that with a one-to-many Priority-to-Contact relation, which works well, albeit a bit cumbersome to use in formulas with the Priority.Filter().Sort().First() expression.

Since there’s a logical order to the different priorities, it would be nice if they could be sorted by public ID instead of lexical order when i select a priority for a Task in its Priority field. I would really like to avoid prefixing the priorities with 1, 2, 3… since it is ugly.

\m/

Perhaps we could get the hidden “Rank” field promoted to “non-hidden”, so that it could be used in Sorting views?

Perhaps we can help you. What would you ideally want to achieve?

1 Like

I would like there to be an way to implement a categorization field for entities in DB that is easy to reference in a formula. I mean, the categories should be formula-accessible as Category.Name or Category[index]. Also, they should appear in logical order in the selection drop-down list, rather than alphabetical order.

Going into single-select fields, I have learned from this forum that single-select fields are actually obfuscated entities, but i have found no single example of how to actually use them in a formula. Say i have an if() automation for Contacts that should return the single-select field value “Tier 1” on true and “Tier 2” on false, how do i reference them in the formula?

Select fields act like types, so if you want to reference them in a formula, you need to reference a field, like Name.
If I have a database called DB, with a select field called Select, then in a formula, I can get the chosen Select for a given DB entity using the formula
Select.Name

And when you say

then it should be the case that the possible options for select drop-down are returned in the order in which they have been configured (not alphabetical order).
image

You can rearrange the order using the ‘handle’ → image

I’m not sure I understand what you’re trying to achieve here. Do you mean that you want to be able to set the value of a select field using an automation?
If so, then you’ll want to read this:

2 Likes

Thanks! I’ll check this out.

Sorry if i was unclear!

The issue of logical order does not concern single-select fields. Say i have an Ideas DB and a Category DB with a many-to-one relation. When i manually select a Category for an Idea, the drop-down list is in alphabetical order. I would like them appear in the logical order in which i defined them, e.g. their public id.

Edit: actual examples

My Priority-Issue relation

The drop-down list when i select Priority for a given Issue. Alphabetical order = annoying.
image

Ugly workaround


image

Edit 2: and the reason i set Priorities as an Entity is because i want to be able to set priorities by automations, which i cannot do with single-select fields.
\m/