Quote:
Originally Posted by ackomb
Is there a way to continue to the next item on the tag list when the first statement is true without actually adding a separate action to the action chain?
I have a number of books that have a large number of crossovers and pairings that I want to change in one action rather then setting up multiple actions for each pairing only slowing things down.
I know 'NEXT' won't work but it is to who what I'd like to do.
[...]
|
You are looking for the "continue" statement.
I am not sure exactly what you are trying to do but I think this might lead you to what you want. I can't guarantee that it will run in your context.
Code:
program:
# As you wrote it, show1 and show2 always have the same value. I think
# you mean this.
show1 = '^Show A$' inlist $#show;
show2 = '^Show B$' inlist $#show;
output = '';
for item in $#pair:
if show1 then
if item == "ABC/XYZ" then
output = output & ',' & "AAA / BBB"
else
output = output & ',' & item
fi;
# I am not sure exactly where you want the loop to go to the next interation.
# This seems like a reasonable guess
continue
fi;
if show2 then
if item == "KLM/NOP" then
output = output & ',' & "EEE/ FFF"
else
output = output & ',' & item
fi;
continue
fi;
# Put more of the test blocks here, e.g., show3, show4, etc
# If we get here then none of the test blocks were true. Add the item.
output = output & ',' & item
rof;
output = list_sort(list_remove_duplicates(output, ','), 0, ',')