Automator Get Value of Variable loses elements of a list

I'd like a variable in Automator to keep a list of file names to be deleted at the end of the workflow. I set the value of a variable to the list of the file names, then when I get the value of the variable only the first file name in the list exists.


The work flow is attached. The beginning file is a pdf file with eight pages. The Split PDF action will create a PDF file for each page. Set Value of Variable will put all eight file names into the variable FileList. However, Get Value of Variable only shows the first file name. The rest of the list is lost.


Any clues what the cause is? What's a workaround that perhaps uses shell scripts or AppleScript?


Mike

iMac 27″, macOS 10.15

Posted on Jul 21, 2020 4:28 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 22, 2020 9:27 AM

Well, now it works. I updated just now from 10.15.5 to 10.15.6. This caused me to close Automator, restart the computer and re-open Automator. The problem is still there if I use the original Automator workflow file. Your reply encouraged me to create a new workflow file from scratch. With the new file the problem is gone.


This is reproducible. Side by side, with work flows that appear to be identical, one file works and one fails. I even deleted all the actions from the old file and re-created them. The problem is something hidden that I can't see.


There is something corrupt about the original workflow file. That file was derived from an older workflow from an earlier version of the OS. Let this be a clue to anyone else whose work flows aren't working correctly.


Thanks for the proof that it sill works.


Mike


Similar questions

3 replies
Question marked as Top-ranking reply

Jul 22, 2020 9:27 AM in response to VikingOSX

Well, now it works. I updated just now from 10.15.5 to 10.15.6. This caused me to close Automator, restart the computer and re-open Automator. The problem is still there if I use the original Automator workflow file. Your reply encouraged me to create a new workflow file from scratch. With the new file the problem is gone.


This is reproducible. Side by side, with work flows that appear to be identical, one file works and one fails. I even deleted all the actions from the old file and re-created them. The problem is something hidden that I can't see.


There is something corrupt about the original workflow file. That file was derived from an older workflow from an earlier version of the OS. Let this be a clue to anyone else whose work flows aren't working correctly.


Thanks for the proof that it sill works.


Mike


Jul 22, 2020 6:30 AM in response to MBonnice

When I construct this Automator workflow on Catalina 10.15.6, and provide it with a 4-page PDF, I receive those four split PDF in the Get Value of Variable Results. I also check its Option setting to Ignore this action's input so I do not get four PDF repeated twice from the Set Value of Variable action results flowing into the last action.

Jul 22, 2020 9:35 AM in response to MBonnice

Mike,


You didn't differentiate whether the initial Automator workflow that did not work correctly was created on an earlier version of Catalina, or an earlier version of OS X, or macOS.


If the first scenario, where this was an older workflow, then rebuilding it in Catalina has been previously known to resolve strange behaviors from older workflows when saved as applications. If the workflow was created in an earlier version of Catalina, and then did not work in 10.15.5, but does now in 10.15.6, then perhaps Apple has fixed something in Automator without mentioning it. Not something that I have personally experienced though.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator Get Value of Variable loses elements of a list

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.