Quote:
Originally Posted by chaley
Assuming your indenting is correct then the missing 'fi' is needed to close the if/elif that begins on line 6.
|
Getting there it was actualy still missing a "else ni" statement for it to work.
Code:
program:
output = '';
for item in $#pair:
if $#show == "show A, Show B" then
if item == "ABC/XYZ" then ni = "AAA / BBB"
elif item == "DEF/UVW" then ni = "CCC / DDD"
else ni = item
fi
else ni = item
fi;
output = output & ',' & ni
rof;
output = list_sort(list_remove_duplicates(output, ','), 0, ',')
But it only works now if it only contains show A and show B in that specific order. But as soon as there is a Show C, which is not interfering with the pairing it does not work anymore.
That means the first if statment should be something like:
Code:
if $#show contains item "show A" and "Show B" then
Of course this does not work but how would, so I tried:
Code:
if $#show != "Show A" && "Show B" then
This seems to work. Just thought I would post it for others researching something similar.