Support Forums

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

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
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.
User avatar
FrankAndrew
Posts: 75
Joined: Thu Oct 26, 2006 7:00 pm

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

Postby FrankAndrew » Fri Jan 15, 2016 6:37 am

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
2016.01.15_11-06-09_ScriptParamCodeBlock.png (30.35 KiB) Viewed 1209 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
2016.01.15_11-05-45_Run-or-Debug_Parameters_Dialog_DefaultValues.png (16.71 KiB) Viewed 1209 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:

2016.01.15_11-05-45_Run-or-Debug_Parameters_Dialog_DefaultValues_WhatTheyShouldBe.png
then...
(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.
Attachments
2016.01.15_11-39_ScriptParamCodeBlock_Problem.zip
(114.46 KiB) Downloaded 117 times
User avatar
davidc
Posts: 4448
Joined: Thu Aug 18, 2011 4:56 am

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

Postby davidc » Wed Mar 02, 2016 12:27 pm

This issue should be resolved in the 2016 release.

David
David
SAPIEN Technologies, Inc.

Return to “PowerShell Studio”

Who is online

Users browsing this forum: No registered users and 7 guests