Using param and export to file

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
bmclain
Posts: 39
Joined: Mon Oct 22, 2007 1:47 am

Using param and export to file

Post by bmclain »

I want to be able to either pull up a form I created with PrimalForms or bypass the form if command line options are selected. I am trying to use this with the Export to File functionality, but the param line is not saved at the top of the script. How can I keep this at the top of the script? I don't want to have to create another script that accomplishes this.

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Using param and export to file

Post by davidc »

I recommend creating a Project and add your existing form. Then move the parameters to the Startup file. From the Main function call your existing form (Call-<formname>) and pass any extra parameters you may need. David
David
SAPIEN Technologies, Inc.

User avatar
bmclain
Posts: 39
Joined: Mon Oct 22, 2007 1:47 am

Using param and export to file

Post by bmclain »

Thanks. That got me a lot farther. Now my only issue is when I try to call the form from the Globals.ps1, I get the following error:

The term 'Call-WAS7_Maint_pff' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.At C:WAS7_Maintenance.ps1:912 char:22+ Call-WAS7_Maint_pff <<<< + CategoryInfo : ObjectNotFound: (Call-WAS7_Maint_pff:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

I've looked at the properties of the form and that is exactly what the Reference Name is set to.

User avatar
bmclain
Posts: 39
Joined: Mon Oct 22, 2007 1:47 am

Using param and export to file

Post by bmclain »

nevermind. I finally figured it out.