Using param and export to file

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 12 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
bmclain
Posts: 39
Last visit: Fri Dec 03, 2021 7:36 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
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

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
Last visit: Fri Dec 03, 2021 7:36 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
Last visit: Fri Dec 03, 2021 7:36 am

Using param and export to file

Post by bmclain »

nevermind. I finally figured it out.
This topic is 12 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.