April 24, 201213 yr Newbies Hi, I've copied and changed the sample script "Extract Field" to "Extract Excel Copy" as in the attached Filemaker 12 file, but keep getting an error in the second dialog box. The script works fine when I copy the file to the container, and I only have issues when the file is in the same directory as the Filemaker file - it passes the first error check If($loaddocs = "ERROR"), but stumbles on the If[$Val = "ERROR"] , giving the error "Name must not be empty". Thanks for your help. Al
April 25, 201213 yr Author Newbies Hi again - this is the script I was using....it works if I change out the "$fieldname" in Line 7 with an Excel cell address (like "B12" or "A5"), but gives the error, "Name must not be empty" if I use the variable, "$fieldname Any help is really appreciated..... Al Set Variable [$fieldname; Value:Get(ScriptParameter)] Set Variable [$loaddocs; Value:ScribeDocLoad("Test.xlsx")] If[$loaddocs = "ERROR"] Set Field [Demo::PDF Field List; ScribeLastError] Show Custom Dialog ["ERROR"; "Error performing this first if statement"] Else Set Variable [$val; Value:ScribeDocReadValue($fieldname)] If [$val = "ERROR"] Set Field [Demo::Field Contents; ScribeLastError] Show Custom Dialog ["ERROR"; "Error performing this second if statement"] Else Set Field [Demo::Field Contents; $val] End If End If Set Variable [$unload; Value:ScribeDocCancel]
April 25, 201213 yr The script is written specifically in the sample file to create a "sandbox" allowing users to test various files. That being said, the script above is taking a parameter and assigning it to $fieldname in the first script step. If no parameter is being passed to the script, the variable ($fieldname) will be empty thereby giving you the error. My advice is to review the Scribe documentation and create your own script without copying our sample file. Unless you mirror the rest of the file you may run into difficulties getting the script to work correctly. Since you are getting a correct result when hardcoding a cell address ("B12" or "A5") it looks like you have the plugin installed and it is functioning correctly.
Create an account or sign in to comment