Storing Data in a Collection

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

Storing Data in a Collection

Post by tconley@semprautilities.com » Thu Jan 28, 2010 12:29 am

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

$FormEvent_Load={
	$ServerName.Focus()
	$DataStore = @() 
}
$handler_Submit_Click={
	SubmitData
	ClearData
}

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

}


http://www.sapien.com/forums/uploads/16 ... yCheck.zip

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

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

Storing Data in a Collection

Post by davidc » Thu Jan 28, 2010 1:54 am

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,

David
David
SAPIEN Technologies, Inc.