Expressions

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 a different scope in which different information is accessible. Expressions are mainly used to calculate numeric values which then can be measured and used in "processing" to provide reports. These reports can provide useful information to find ways of optimisation.


Expression can be set, if a parameter's type is a string or a number.


How to create an expression?




1. To set an expression, click on :

2. In the dialog table enter an expression "p(1) * p(4) + 1.3" 

3. Click



p(1) * p(4) + 1.3

SignWhat does it indicate?
pIt 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


On how to create a function, click here.


How to get data from an order proposal?


Ordered products




FieldHow to write it in expression?
Name
orderProposalProduct.getName()
QuantityorderProposalProduct.getQuantity()
Package quantityproduct.getPackageQuantity()
Unit price
orderProposalProduct.getPrice().getAmount()
Parametersp(how to get id, read below)
Testp(218)
ΔEp(157)

productionOrder.getQuantity()


Template


Field
How to write it in expression?
Order nameorderProposal.getName()
Customer's code
orderProposal.getCustomerNumber()
Customer nameorderProposal.getCustomer()
Customer manager name
orderProposal.getCustomerEmployee().getName()



How to get data from an order proposal product?



Field
How to write it in expression?
Sale PriceorderProposalProduct.getProduct().getSalePrice().getAmount()
Stored quantityorderProposalProduct.getProduct().getStoredQuantity()
Product name in Order Product testtemplate("{% for a in order.orderProducts %}{% if test.article.id == a.product.article.id %}{{ a.product.getName() }}{% endif %}{% endfor%}")


How to get a parameter's ID?



 To get a parameters ID:

 

        1. Go to  ;

        2. Then- ;


Now you can see the parameter ID and name:




Where can you use expressions?


You can write an expression ( Click on ):


1. In the "Article Options": 


2. In the "Article Parameters" (Order Parameters, Product Parameters, Production Parameters (field should be empty )):


3. In workplace "Option Parameters":


4. In material "Type options":


5. In staff department "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 idproduction.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 productionyear' 'month' 'ABC' '~