Curious if anyone has an idea for this one, I’d like to use an unsorted table view (or did) to move items up and down and calculate their visible row number and put it in a row field. (basically I want to have a unique and intentional sort order that I create by dragging and dropping. Any ideas?
Both list view and the new grid view allow drag and drop re-ordering.
Out of interest, why do you want/need to get the position (number) of an entity in a given view and put it as a field value for each entity?
This is not possible in general, since View filters can change which entities are displayed – so in different Views, a particular entity’s “row number” could be different (and it might not even be displayed).
Within a script you can access the hidden
Rank field, which reflects each entity’s displayed relative order in unsorted views (see links posted above by @Chr1sG).
The Rank hidden field is changed by drag-re-ordering entities in a List view.
I was thinking about something similar to build my card-sort Grid View (yes, needs a different name).
Technically, if I give an entity
Y number single-select fields, I could use those on a Board View as coordinates and then drag cards around as I want. Only problem is that new numbers aren’t being added automatically, but would need to be done manually…
So I want to do this for export reasons we are using a DB as a data source for a game. Due to the nature of adding/removing items over time the DB is not in the right order so I can’t use their unique id. We are willing to drag and drop things into an order in one view and the copy that row order into a field of each of the DB entities. We have resorted to just doing it manually for now but I’ll come back and look into the rank thing sometime