emptyfield
FIELD

The emptyfield statement tells Panorama to move to the next available (empty) field in a series of line item fields.


Parameters

This statement has one parameter:

field – the name of the line item field. It should include the Ω symbol (Option-Z) in place of the number portion of the field name.


Description

This statement makes the next line item field that is empty the current field. Most commonly this is used so that you may begin editing that field or to place a value into that field. This command would be useful if you wished to add something to an invoice record that had been previously created, allowing you to go to the next available line item field to add the additionally ordered items.

This simple example tells Panorama to go to the next line item PriceΩ field that is blank.

emptyfield "PriceΩ"

This example looks for the next available line item field similar in name to the current field name.

local theFieldName
theFieldName = regexreplace(info("fieldname"),"[0-9]+$","")
emptyfield theFieldName+"Ω"

If there is no empty field available (either the fields don’t exist, or they are all full), this statement will return an error. You can trap this error if you need to (see Error Handling), as shown in this example.

emptyfield "ItemΩ"
if error
    nsnotify "No more items available."
endif

Error Messages

There is no empty field available. – This means that either there are no line item fields with the specified name, or all of the line item fields are already full.


See Also


History

VersionStatusNotes
10.0UpdatedCarried over from Panorama 6.0, but now an error occurs if there are no empty fields available.