Storing Data in a Collection

Archived support forum for customers who once purchased a PrimalForms product license. This forum is locked.
This topic is 14 years and 2 months 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.
User avatar
tconley@semprautilities.com
Posts: 18
Last visit: Thu May 27, 2021 11:28 am

Storing Data in a Collection

Post by tconley@semprautilities.com »

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
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

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,

David
David
SAPIEN Technologies, Inc.
This topic is 14 years and 2 months 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.