Form part creates a preset forms for an interface. This part uses data model part properties.
Firstly we will open a new form in the process.
- Click on the "Expense Form" section below the pools title. Diagram overview screen will open on the same screen.
- Click the plus button under the forms title.
- Enter "Expense Form" name in to name field.
- Click on "Expense Form" section, form design page will appear as an empty screen.
Secondly we will start to design form.
- Click on the first row, click "add new" button. Select "ExpenseForm" element.
- Select the type of section below the design title.
1.Part: Owner
Owner part consists from identity and department elements.
- Click "add new" button, select owner. Select the type of section below the design title.
- Click "columns" button and choose second one.
- Click on first part below the owner field and click on "add new" button then select again owner element.
* Click on row below the second owner, click "add new" button and select "Identity" element.
* Click on second part below the owner field and click on "add new" button then select again owner element. Click on row below the second owner, click "add new" button and select "Department" element.
2.Part: Form Information
From information part consists from date element.
- Click owner title field and click second grid around this field. Click on "add new" button then select form information element.You will see "form information" element below the owner. Select the type of section below the design title.
* Click on row below the form information, click "add new"button and select "FormInformation" element. Click on row below the form information, click "add new" button and select "Date" element.
3.Part: Expense List
Expense list part consists from date reason, expense group, date, amount, unit, VAT, cross rate and converted amount elements.
- Click owner title field and click second grid around this field. Click on "add new" button then select expense list element.You will see "form information" element below the owner. Select the type of section below the design title.
- Click on row below the form information, click "add new" button and select "ExpenseList" element.
- Click "add new" button six times. You will see seven fields below the expense list title. Those fields caption will be "empty".
* Click first empty row, click "add new" button and select reason element.
* Click second empty row, click "add new" button and select expense group element.
* Click on convert button under the expense group field, select dropdown property.
* Click on data sources title, click "add new" button below the data sources and select Static List Item.
* Click add new button and enter the Vehicle in to text field, enter the "1" in to value field.
* Click add new button and enter the Service in to text field, enter the "2" in to value field.
* Click add new button and enter the Energy in to text field, enter the "3" in to value field.
* Click add new button and enter the Communication in to text field, enter the "4" in to value field.
* Click add new button and enter the Fees in to text field, enter the "5" in to value field.
* Click third empty row, click "add new" button and select date element.
* Click fourth empty row, click "add new" button and select amount element.
* Click empty area under the amount field and paste the "Sum:{{sum(//ExpenseList/Expense/Amount)}}".
* Click fifth empty row, click "add new" button and select unit element.
* Click on convert button under the unit field, select dropdown property.
* Click on data sources title, click "add new" button below the data sources and select Static List Item.
* Click add new button and enter the USA Dollar in to text field, enter the "1" in to value field.
* Click add new button and enter the Euro in to text field, enter the "2" in to value field.
* Click add new button and enter the Turkish Lira in to text field, enter the "3" in to value field.
* Click sixth empty row, click "add new" button and select VAT element.
* Click on convert button under the VAT field, select dropdown property.
* Click on data sources title, click "add new" button below the data sources and select Static List Item.
* Click add new button and enter the "10" in to text field, enter the "1" in to value field.
* Click add new button and enter the "18" in to text field, enter the "2" in to value field.
* Click add new button and enter the "8" in to text field, enter the "3" in to value field. - Click on expand button near to reason element. New row will open, click on the row.
- Click "add new"button, select "CrossRate" element.
- Click cross rate title field and click second grid around this field. Click on "add new" button then select again expense element.
- Click on row below the expense, click "add new" button and select "ConvertedAmount"element.
Calculate the converted amount:
The following steps show road to calculate the converted amount.
- Click on the "Expense Form" section below the pools title. Diagram overview screen will open on the same screen.
- Click expand bottun on the expense form. Select the script.
- Paste the following code on the script page.
$Xml.Live('//ExpenseList/Expense/CrossRate', function() { this.SetValue('../ConvertedAmount', this.EvaluateNumber() * this.EvaluateNumber('../Amount')); }); $Xml.Live('//ExpenseList/Expense/Amount', function() { this.SetValue('../ConvertedAmount', this.EvaluateNumber('../CrossRate') * this.EvaluateNumber()); });