Finally found a reason to have a play with this one
Not sure how useful this will be for others, but @Jeff_Hager might find it of interest.
It accepts two joined lists, and will sort the values in the first list using the values in the second list as sort keys, and will return the sorted list as a single string with the delimiters stripped out.
I had a very specific use case for this, which was to transform a table like this:
It takes an optional delimiter as a 3rd parameter. In this case I used
|| in my joined lists as the source data (the dates) contains commas.
Update: This has been moved to GitHub, and a few more options added. Link has been updated.
Hi, any chance this stopped working or am doing this wrong?
The list is not changed at all - in fact no matter what I type in the Joined List - sort keys it returns the original list
I haven’t touched it for a long time. It might be that the hebrew text is tripping it up, although I wouldn’t think so.
Do any of the rows in your “JoinedDataTable” contain commas? That would certainly break it, if they did.
I actually have a “more advanced” version that I use now, that has a few more options. This is the one that I use mostly now. Perhaps you can try this one?
Update: oh, are you using the one on Replit? I don’t maintain that one anymore, I should take it down. I moved all my code columns to GitHub a long time ago. I’ll update the original post.
still getting the same list.
see the sorting number of step down yet it still appears last
Any chance you can share some sample data with me, and I’ll see if I can debug it?
|Barbell Hip Thrust
|Knee banded frog thrust
||מייד אחרי התרגיל הקודם
||כל אימון להתחיל מרגל אחרת. להוסיף משקל
|Barbell Sumo Deadlift
||חובה לצלם - להתחיל משקל נמוך
|Bent Knee Side Bridge Hip Abduction
||אם קל לשים משקולת על הירך
|Lying Leg-Hip Raise
hmm, seems to work fine for me…
can you screen shot the lists?
I’d share the whole thing, but unfortunately you can’t share apps that use Experimental Code columns.
Template for the table rows
Joined list of table rows
Joined list of the Sort column
thats a mystery im doing the exact same here:
and i get this
could you remove the ex column and share it
There is a bunch of other junk in the app. It’s just one I use from time to time to experiment with things. So you can ignore all that - just look for the table called “Lin”
OHH never mind I got it!!
I didnt use a comma in the TD joined list becuse HTML dosent need it but the sorting does.
Yeah, that’s a bit of a trap. A delimiter is required for it to work. I generally use a double-pipe
||, because every now and then there might be a comma in the data (dates, for example).
If the Sort is empty the EX column returns blank instead of the original order.
and if I use a template to replace with 1 for example the sort is DESC
What is the desired behaviour if the sort row is empty?
Should the row be ignored, or default to zero, or?
I have case where the user doesn’t need to sort the list because he is ok with the order he created the rows. also sometimes he would use sort only on several rows.
the app behavior is if the sort is empty the list is displayed in the sheet order, and if some rows have a value they appear under the blank sorting rows.
I would like the joined list to do the same.
added example: some rows with sort
hmm, you’ll probably need to create two template columns for the table rows - one with delimiters and one without. Then use an if-then-else column to decide which one to use in the table. If the sort is empty, use the one without delimiters and plug it straight into the table. Otherwise use the one with delimiters and pass it through the experimental code column first.
or do that
can I fork this and just change the default parameter?