May 15, 2020 10:03 AM
I am doing a rollup on a field that has text (2-letter US State):
I am wondering if there is any way to alphabetize the result output?
May 15, 2020 11:10 AM
If you sort the primary field alphabetically, will the US states be also alphabetized? If so, you can run the batch update block on the linked record field to sort the linked records alphabetically. Then the rollup values should be sorted the same as the linked records.
Nov 17, 2021 06:44 PM
I am also looking for this feature
May 05, 2022 09:37 AM
I don’t understand how to sort the primary field alphabetically or how to run the batch update block on the linked record field.
May 05, 2022 10:01 AM
May 05, 2022 10:27 AM
Here’s some background. I have a table called Guests and each record has a field called Last Name. But, the Last Name field is calculated with a formula.
In another table called Episodes, every record has a field called All Guests with a Rollup formula that collects all of the Last Names from the Guest records mentioned above.
Here’s the Rollup Formula: SUBSTITUTE(ARRAYJOIN(values), “,”, “-”).
Desired Result: Ben-Levy-Yakov
I want the 3 names to be in alphabetical order. Can the Batch Update App help with that? I assume it will not work on theLast Name field in the Guests table.
May 05, 2022 02:20 PM
Formulas and rollups cannot sort. Batch Update will only sort linked records by the primary field. Since the last name is probably not the primary field Batch Update probably won’t help you. The order of values in rollups matches the order of linked record fields.
By the way, here is a simpler rollup formula. Does the same thing, but just a little simper.
May 06, 2022 11:15 AM
Thanks for the simpler version.
The order of values in rollups matches the order of linked record fields.
How do I change the order of the linked record fields? I know how to sort in a table view, but this is something different, right?
May 06, 2022 11:50 AM
Yes, this is different.
You can open the linked record field cell and drag-and-drop the linked records to rearrange the order.
You can use scripting to rearrange the order.
You can use Batch Update to re-order by primary field value.
I also write an app for the Marketplace for sorting linked records. However it is still in review at the moment.
May 10, 2022 06:27 AM
Is your app available in beta? When do you think it will be released?
Also, how do I get started writing a script to re-arrange the order in the All Guests field?
May 10, 2022 06:37 AM
If you want a script to run automatically, you can design it to run as an automation script. If you want the script to process records in bulk, it can do that too. It is all in how you write the code. However, typically is is difficult to have an automation script run on records in bulk unless it is set to run on a schedule versus being triggered by an individual record.
I’ll send you a direct message with more info on trying out the pre-release version of my app.
May 10, 2022 09:51 AM
Awesome! Thank you. :thumbs_up:
Nov 13, 2022 03:41 PM
@Chris_Dukes, did you ever figure out how to script the arrayjoin(values) to return a list in alphabetical order? Thanks for the reply!