Storing Data in a Collection

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
User avatar
Posts: 18
Joined: Fri Dec 11, 2009 9:09 am

Storing Data in a Collection

Post by »

I have create a varible in my form load that is meant to hold the working data while the script runs but it seems to not get updated correctly what am i doing wrong? It is suppose to be update when the submit button is clicked but It seems to not be holding the data properly.

Code: Select all

	$DataStore = @() 

Function SubmitData {
	$Temp ="" | Select-Object Server_Name, Asset_Tag, Serial_Number, Issue
	$Temp.Server_Name = $ServerName.Text
	$Temp.Asset_Tag = $AssetTag.Text
	$Temp.Serial_Number = $SerialNumber.Text
	$Temp.Issue = $Issue.Text

	$DataStore = $DataStore + $Temp

	$Display.Text = $DataStore | ft -auto |Out-String

	return $DataStore

} ...

tconley@semprautilities.com2010-01-28 07:41:56

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

Storing Data in a Collection

Post by davidc »

I recommend posting this question on one of the ScriptingAnswers forums. They are better suited to answer these types of questions.

This forum is geared to answering technical questions about the product.

Thank you,

SAPIEN Technologies, Inc.