Hi
I have a table, of which I would like to arrange the rows according to the first letter of the column [Name].
Now I want the user to be able to select which letter the list starts with:
for example: in user settings the user indicates that he wants to start the list with D -> the list would then start with all the names starting with D, then E,โฆ then Z, A -> C
Do you think itโs possible?
Bram
No idea if this will work, and itโs a bit of work to set up. But maybe give this a shot:
Create a list of {โAโ,โBโ,โฆ-โZโ}, and FIND the position (X) of the userโs selected value in that list.
Then take the RIGHT X characters of A-Z, and CONCAT with the LEFT 26-X.
THEN, use that list and find each rowโs position and store that number in a virtual column to sort on.
I think this should work, but havenโt tested it. Itโs similar to @GreenFluxโs idea.
Create a virtual column with the app formula below, the configure your table view to sort first by this column and second by the Name column.
MOD(
(
FIND(LEFT([Name], 1), "A...Z")
- FIND(USERSETTINGS("Names Start"), "A...Z")
+ LEN("A...Z")
),
LEN("A...Z")
)
LEFT([Name], 1)
gets the first character (presumably a letter) from [Name]
.
FIND(LEFT(...), "A...Z")
gets the place in the alphabet of the letter from (1). Note that A...Z
everywhere in this expression should actually be ABCDEFGHIJKLMNOPQRSTUVWXYZ
(i.e., the entire alphabet youโre using). I abbreviated just for clarity.
USERSETTINGS("Names Start")
gets the userโs preferred starting letter. Replace this with any expression that will provide that piece of information.
FIND(USERSETTINGS(...), "A...Z")
gets the place in the alphabet of the userโs preferred starting letter from (3). Remember to replace A...Z
with your entire alphabet exactly as used in (2).
LEN("A...Z")
computes the number of letters in your alphabet. Again, replace A...Z
. You can also just replace LEN("A...Z")
with the number.
Itโs just miraculous!
Perfect!
Nice!
Thx a lot โฆ I can show off now!
Bram
User | Count |
---|---|
40 | |
29 | |
24 | |
24 | |
13 |