Apply conditions and mathematic functions on the Data
Hi, my name is Kumar and in this video I will demonstrate how to Apply Conditions and Mathematic Functions on the Data.
Any user with basic XML and programming knowledge can customize the iVend POS receipts.
Let us see how it is done.
In Management Console, under Administration go to menu Retail Configuration and select Print Profile. Print Profile Search screen appears. Here, choose the available print profile and click Edit button to edit the record. You can edit the XML format of any of these POS receipts by clicking on the Document icon in Data column and the sample XML documents are available in your iVend Server at iVend Installation folder.
Let us go to iVend Installation folder. In iVend Installation folder, go to Management Console and then go to Receipt Format folder, and here are the XML POS receipts. Let us open this in any XML editor and here we will see the applied conditions in this XML receipt. XML receipt has 'if else' condition to give programming condition to print the data. This is the 'if' condition with static value.
Let us check out another condition with compare object value. This is the 'if' condition with compare object value.
Now, attributes of 'if' elements are Object, Operator, Value Attribute, and Compare Object Attribute. Object Attribute refers to the object property on which condition is executed. Operator Attribute refers to the conditional operators and Valid Values are not equal, equal, greater than, greater than or equal, less than, and less than or equal. Value Attribute for existing value to compare with and Compare Object Attribute refers to the object property to compare with.
Please note, 'then' element is mandatory as mentioned in this example; however, 'else' element is optional if condition cannot be defined the row element.
Now, let us see the elements used to set the value of the variable declared by Variable element and to implement the mathematical function.
For that, I will open another XML receipt. This is the Variable element which has Variable Name Attribute. Variable name refers to the name of the variable to be used in the receipt. Then, there is Variable Set Value element. This element is used to set the value of the variable declared by the variable element.
This element is also used to implement the mathematic functions as applied here. Attributes of the Variable Set elements are Variable Name which refers to the name of the variable which is defined earlier in the script. String attribute refers to the constant value to the variable. Object 0 attribute refers to the object property whose value will be set in the variable. Please note, Variable Set Value element cannot be defined inside the row element.
So, in this way user can apply conditions and mathematic functions on the data.
With this, we end our session.
Thank you for watching this video.