The need() command does not do anything, it acts as a control to ensure that commands following the need command are only executed if the condition is met. This provides a quick way of putting conditional operations onto buttons.
The need command verifies that the request attribute is true. If the need condition is met the remainder of the line is executed, otherwise the command line execution is cancelled
need(sale)
Verify that a sale is present before processing any further commands on this line. Subsequent lines in script files are not affected. This command is primarily designed for use in User Interface files, such as requiring a sale to be present before processing a button click command.need(nosale)
need(customer)
Verify that a customer is present on the active sale before processing any further commands on this line. See need(sale) for additional information.
need(account)
Verify that a customer is present on the active sale, and that the customer has an account, before processing any further commands on this line. See need(sale) for additional information.
need(teller)
Verify that a teller is present before processing any further commands on this line. See need(sale) for additional information.
need(saleline)
Verify that the current active sale, has a selected saleline
need(svc)
Verify that an SVC/Prepay card is available on the sale.
need(reward)
Check if sale has rewards pending
need(topay)
Ensure that some amount is still outstanding to pay.
need(transit)
Ensure the current sale or system is operating in transit mode for dispatching stock to another location.
need(shift)
Verify that a shift has been opened. If no shift is open, do not process any more commands in the list.
need(focus)
Verify that the POS application currently has Windows focus, and if not then stop processing the rest of the commands in the list.
need(active)
Verify that the POS application is the active Window, and if not then stop processing the rest of the commands in the list.
need(workingsale)
Verify that a workingsale data model anchor is available currently. This might be used on buttons to validate that the subsequent action is possible, before initiating a pop up screen.