Alright, we’re going deep now @Krunal_Sheth. I’ve updated my test doc.
The use case here is an estimate builder. The estimate table is grouped by 2 columns: Space and Item Category.
The table contains a checkbox column and a button workflow that lets the user select certain line items and “package” them into a new line item under the category “Package” while removing the rate value from each of the “packaged” line items. Essentially we’re changing the way a customer would view pricing information in the table from many individual rates to one “package” rate.
Once created, I want the “Package” category to display first within each Space group. This may require manual re-arranging by the user, and that’s fine, but I need the Item # column to update dynamically based on the row’s current visible position within the entire table. I’m also using a filter to only display an Item # value for rows with a Rate value, so customers can easily differentiate between line items that are affecting the total price vs those that are presented for reference only.
I believe your “Package” item has some field that marks an item as “package” (and you have coditional formatting that makes it bold) - if you always want it to stay on top -just applying “sort” on that field and then use that to set ordered items would avoid requiring manual ordering - at that point the earlier solution would work just fine.
Yes, adding Sort() to my button workflow solved having to manually re-arrange the Package rows after they’re created (thank you!), but it doesn’t solve the issue with the Item # column being out of order due to the table groups.
it would if you first filter the rows to a specific group before you try to find an item. if you look at the example above i shared, it shows how it can be done. if you are still running into issue - please reach out to support (from in product chat) and ask to be connected with me (Krunal) and we can look at it together.
For the very simplistic case of getting the visual position in a table that is not sorted (other than manually), I’ve found this formula to be the simplest of all:
Hi, related to this question, if I have two tables, and one is a view of another with some filter applied, how do you keep a visual position of the rows but only keeping count what visually shown in second tables only?
For example, table about tasks, so the source table is a list of tasks with status (open, in-progress, done), and I want to sort it manually (the most prioritized task are on top).
And then I have the second table which is a view of the tasks table, but filtered with only the tasks that are not done (open, in-progress). How do I make a column in this second table with the number of visual position of row in this table? What I find is it’s always taking account of the filtered rows from the source table. So it would still be sorted, but skipping some numbers. So this visual position column will filled with something like 1, 2, 5, 6,7, 9, etc - because 3,4,8 are tasks that are “done” hence are filtered/not shown in the second table, but actually is present in the table.
Basically, if your View has different filtering and/or sorting than the source table, then you have to “reconstruct” that filtering/sorting via formula, which returns a filtered list of rows in a sorted order that matches what your View is rendering. Then you just append .Find(thisRow) to get the position of the row in that filtered/sorted list, which coincides with what is being visually rendered by the View.
Have a look at the blue column below.
It would be nice if the filtering/sorting of a given source table or View could be referenced directly via a reference like thisTableConfiguration or something similar.