# StoreData

You can use the StoreData function in conjunction with a Repeat or RepeatUntil function to store the results of a cell.

Note:

- When used in conjunction with the Repeat or RepeatUntil functions to generate a loop, place the StoreData function inside the loop of spreadsheet cells being iterated. Otherwise, the StoreData function only runs once, and does not update in sync with the loop.
- The StoreData function stores data in a "first in, first out" manner, meaning that when it stores a new result, that result is stored in the buffer under index 0, and subsequent results are stored under a subsequent index.
- The StoreData function does not store the data it contains when the job file is saved. StoreData functions in your job file automatically reset when you load a new instance of the job.
- If a stored cell contains a reference to an input image, the StoreData function does not store the input image. If you reference the StoreData output with a GetValue function, the GetValue function output only displays the graphics unique to the stored cell.

Inputs

Syntax: StoreData (Event,Data,Number of Steps,Reset)

Parameter | Description
--- | ---
Event | Specifies the event on which to read the specified Data. This parameter must be a reference to one of the following: The Image data structure in cell A0, containing the AcquireImage function. A cell containing an Event function. A cell containing a Button function.
Data | Specifies a reference to a cell containing a results restructuring cell with numeric or string values. Note: The StoreData function cannot be used with Image functions, DetectFlaw, FlexFlawModel, ReadIDMax, TrainFlawModel, TrainPatMaxPattern, ValidateIDData, VerifyIDCode.
Number of Steps | Specifies the number of repetitive iterations; 1 to 5000.
Reset | Specifies an event on which the stored data will be reset.
Manual | The values will be reset based on a cell containing a Button function.
Online | The data will be reset when the In-Sight vision system is placed Online.

Outputs

Returns | A Data data structure containing result data for the specified Data over an interval from Reset to current.