Expressions
modified:Expressions are useful to perform various mathematical, statistical, and logical operations. You can write expressions in multiple contexts inside the Proman system. Each context has different scope in which different information is accessible. Expressions mainly used to calculate some numeric value which then can be measured and used in "processing" to provide reports which can provide information which is useful to find ways to optimise.
Expression could be set, if parameters type is String or Number.
Where you could use Expression you can see below
How to create Expression? |
If you would like to set Expression, you could pressand set it.
1. To set Expression you need to press :
2. In dialog table enter expression "p(1) * p(4) + 1.3"
3. Press
p(1) * p(4) + 1.3
Sign | What does it indicate? |
p | It is parameters ( (p(1) - Colors) and (p(4) - Layer)) |
(1) (4) | It is parameter's Id (you can choose parameters, pressand find it in a list. |
+ - * / | It is mathematical signs |
1.3 | It is a number you need |
How to create the function, you could see here.
How to get data from Order Proposal? |
Ordered products
Field | How to write it in expression? |
Name | orderProposalProduct.getName() |
Quantity | orderProposalProduct.getQuantity() |
Package quantity | product.getPackageQuantity() |
Unit price | orderProposalProduct.getPrice().getAmount() |
Parameters | p(how to get id, read below) |
Test | p(218) |
ΔE | p(157) |
productionOrder.getQuantity() |
Template
Field | How to write it in expression? |
Order name | orderProposal.getName() |
Customer's code | orderProposal.getCustomerNumber() |
Customer name | orderProposal.getCustomer() |
Customer manager name | orderProposal.getCustomerEmployee().getName() |
How to get data from Order Proposal product? |
Field | How to write it in expression? |
Sale Price | orderProposalProduct.getProduct().getSalePrice().getAmount() |
Stored quantity | orderProposalProduct.getProduct().getStoredQuantity() |
Product name in Order Product test | template("{% for a in order.orderProducts %}{% if test.article.id == a.product.article.id %}{{ a.product.getName() }}{% endif %}{% endfor%}") |
How to get parameters id? |
1. To get Parameters id, you should:
1. Go to Technology:
1.1. Press ;
1.2. Press ;
Now you can see Parameters id and name:
Where could you use Expression? |
You can write expression (you must press and write your expression here):
1. In Article Options
2. In Article Parameters (Order Parameters, Product Parameters, Production Parameters (field should be empty ))
3. In Workplaces Option Parameters
4. In Materials Type options
5. In Staff Departments Specialisations Options
The result of this expression you can see in Staff --> Employees --> Choose employee --> Operations
Which value you would like to get? | How to write it? |
To get article id | production.getArticle().getId() |
Take two parameters and multiply them: p(1) * (p2)
Take part of default product quantity for production: production_product.getProductionQuantity() * 0.3
Generate unique numbering for production: year' 'month' 'ABC' '~