Add Logging?

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 11 years and 8 months 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
shardison5@gmail.com
Posts: 7
Last visit: Wed Nov 16, 2022 6:51 pm

Add Logging?

Post 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?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Add Logging?

Post 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
David
SAPIEN Technologies, Inc.
User avatar
shardison5@gmail.com
Posts: 7
Last visit: Wed Nov 16, 2022 6:51 pm

Add Logging?

Post 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.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Add Logging?

Post 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
David
SAPIEN Technologies, Inc.
This topic is 11 years and 8 months 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.