Let's say I have a file name that I parse into separate parts like so:
nameWords = Words(name, "_")
Let's say I want to make a short name out of the first five words of the original name:
shortName = Concat Items( nameWords[{1, 2, 3, 4, 5}], "_" );
Everything works fine while I'm getting names in the format that I expect, i.e. more than five words in the name.
But as soon as I get name like "aaa_bbb_ccc" (quite unexpected, but totally real) I get an error when indexing into my list.
Question: How do I index into not 5, but the least of 5 and the N Items of the list? Rather than write an IF statement to figure out which is less?