Your logic seems faultless, so I'm assuming that you're getting dinged by the execution mode. By default the action run from the UI starts in stepwise mode. The 'Exists Test' function returns true if at least one field matches the condition. If you have 10 files and one of them has a Grouping field, the action test state will be set to true.
If you use a Compare Text Test, the condition is only true if 'for all files'. Simply compare against an empty string. This is safer but still will not do exactly what you want because it will only copy if all the files have a Grouping field. You want to treat each file individually.
You can put a Forced Grouped Execution at the start of the action (which may or may not be appropriate for whatever else you're doing).
...... or you can call another action which executes groupwise.
eg.
main action statements
....
Run inline action 'Grouped Stuff' grouped
....
Start Grouped Stuff
Test if the Grouping field exists
if true
Copy the Grouping field to the Genre field
endif
In the above example everything in the 'Grouped Stuff' action is executed as a group for each file, before proceeding to the next file.
There's a help topic called 'How Actions Execute' (available off the main help page) which describes stepwise/groupwise execution mode.... hopefully a little clearer than I've just done it 🙂
Regardless of the solution, what you are trying to do is probably a fairly common scenario. I will look into adding another option to the Copy statement so that you can require the source to be 'non empty'.
|