Fieldpine Logo Documentation Home  

PosScript Data Variable Type

One variable type available is the data() type. This is not a single value but provides access to internal POS variables in a controlled way.

Information is broadly split into groups and subgroups

Memory Space

Sales and Salelines have a "memory" space for script designers to store persistent values. These values are preserved across script and event calls and exist for the life of the sale or saleline. They are NOT saved across POS restart or sales being parked/unparked. If you are familar with Javascript SessionStorage and localStorage you will find data memory easy to understand.

Example. Setting a value called 'TicketRef' on a saleline
	set data(workingsaleline.memory.TicketRef) = "ABC456"
Example. Recalling the value 'TicketRef'
	set tick = data(workingsaleline.memory.TicketRef)
Example. Setting a value called 'MyFlag' on a sale
	set data(activesale.memory.MyFlag) = 'milspec'
Example. Recalling the value 'MyFlag'
	set flags = data(activesale.memory.MyFlag)