Page 1 of 1

Add Logging?

Posted: Mon Jul 02, 2012 4:50 am
by shardison5@gmail.com
I have created a form with serveral buttons, actions and dynamic menus. I would like to be able to write to a log file in the background so I know what options were presented to the end user and what they clicked etc.. for troubleshooting purposes.

I created a "MYLog" function (I use the same function with standard powershell scripts) but I can't get it to write anything to a log file. I thought that if I created a Function then I would be able to call it anywhere in the script. Can you give me some advice on how to write to a log file in PrimalForms?

Add Logging?

Posted: Mon Jul 02, 2012 4:56 am
by davidc
For scripting questions I recommend posting in our scripting support forums: http://www.scriptinganswers.com The forum is monitored by several PowerShell experts who are better suited to answer your question. I recommend including your function definition when you post your question. David

Add Logging?

Posted: Mon Jul 02, 2012 6:15 am
by shardison5@gmail.com
Maybe I should rephrase the question?? Can you write to a file from a .pff file or PrimalForms. I have a form and if someone clicks a certain button on the form I would like to write to a local file that they clicked that button.

Add Logging?

Posted: Mon Jul 02, 2012 6:39 am
by davidc
Yes, you should still be able to write to files (ie. use Get-Content and Set-Content cmdlets) in the forms. You might want to check permissions if the script can't write to a file but you should get an error message depending on the method used. David