Basically Identical Scripts but Part of One Won't Work
Hi again, everyone.
So, I've got two folder level scripts that are practically identical. The only difference is that one is meant to merely save the current PDF Form open to specific folder based on field data, the other is meant to batch import from a tab deliminated file and save it based on the same criteria.
PasteBin of Save Script - https://pastebin.com/NdWSzKxL
PasteBin of Import Script - https://pastebin.com/Wv0JG52p
The import script is the one not working, but only part of it isn't. The import is done with a while loop with a switch block inside of it. The first 4 cases in the switch are run if the last character of the string is a non-number (with NaN) and the -1 case is run if the string ends in a number.
It runs the imports of the first four cases with ease, but for some reason it breaks if it's all numbers. Whereas my Save script runs everything just fine. The code was literally copy-pasted from the Save to the Import but for some reason it's breaking when inside the While loop.
Any ideas?
