calling Variables from child forms into job scripts

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.

This forum is a space to discuss coding involving Graphical User Interfaces (GUI) in PowerShell or using WinForms controls, and technical issues related to development.

- Question about a licensed SAPIEN product? Post here: Product Support for Registered Users
- Question about a trial SAPIEN product? Post here: Former and Future Customers - Questions
This topic is 7 months and 1 week 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.
Locked
User avatar
scott-fox1984
Posts: 5
Last visit: Fri Oct 18, 2024 9:51 am

calling Variables from child forms into job scripts

Post by scott-fox1984 »

Product, version and build: PowerShell Studio 2024 Version 5.8.238
Operating system: Windows 10 22h2
PowerShell version(s): 5

*** Please add details and screenshots as needed below. ***

to preface this question i want to state i know a few things about this already

1. I know you cannot pass variables into jobscripts at all as job scripts are different powershell instances all together.
2. I've called on Variables from other forms previously by using a variable by using the name of the childform and the object property name such as

$LogLocationRequest_LogFolderBox_SendMessage (this form in particular pops up a child form asks where you want to send logs to and puts that into a text box and other places in script can use that location as a variable)

my ask now is, i want to be able to call in a function like "get-logs" which will spit out a bunch of files into the location you are saving your logs to but were calling that location from the first child form. is there any possible way (i'm thinking there isn't but wanted to ask) that i can call in using that same location that we set in that first child form.
User avatar
apowershelluser
Posts: 207
Last visit: Thu Oct 10, 2024 1:55 pm
Answers: 2

Re: calling Variables from child forms into job scripts

Post by apowershelluser »

Provide example form please. Helps eliminate the guess work.
This topic is 7 months and 1 week 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.
Locked