Param() default value is not appearing properly if $env:... is being used.

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 138
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Thu Oct 26, 2006 7:00 pm

Param() default value is not appearing properly if $env:... is being used.

Post by FrankAndrew »

Product, version and build: PowerShell Studio 2015
32 or 64 bit version of product: 64
Operating system: Windows 7 Enterprise [6.1.7601]
32 or 64 bit OS: 64

Hi Guys and Gals,

Here I am again with the next PowerShell Studio Problem.

Here is a code snippet of the param() block:
2016.01.15_11-06-09_ScriptParamCodeBlock.png (30.35 KiB) Viewed 1688 times
As you can see on line 58 the default value should be $env:COMPUTERNAME.

Here is what is currently being presented:
2016.01.15_11-05-45_Run-or-Debug_Parameters_Dialog_DefaultValues.png (16.71 KiB) Viewed 1688 times
As you can see you guys/gals are only putting the name of the variable into the field as if there was NO default value.

For the Parameter on line 63 it DOES display the correct value but it was a literal string and that is easy to transfer from the code to the dialog.

This is how I think it should be reacting:

oops! I can only include/attach three (3) file!!!

You will have to open the attached ZIP file and have a look at the file:

(Think of the %COMPUTERNAME% being replace with the proper environment variables value for the machine that I am current working on)

I hope you can "fix" this, if NOT let me know why not.

By the way your web-site application that helps us fill in these BUG-REPORTs is VERY good BUT after I have attached three (3) attachments and tried to attach another it first Looks like it is going to work but..... after the fileChooser Dialog has been closed using the "Open" button nothing really happens!! There is NO new file in the attachments list AND there is NO Dialog or message telling me that this fourth file is NEVER going to be included.

Maybe you should deactivate the "Add files" after three files have been attached and re-activate it when one is deleted. That sould help.

This app crashed on me the first time I tried to add a fourth file. In the next try it just ignored the "Open" selection attempt as far as I could see.
(114.46 KiB) Downloaded 154 times

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

Re: Param() default value is not appearing properly if $env:... is being used.

Post by davidc »

This issue should be resolved in the 2016 release.

SAPIEN Technologies, Inc.