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

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


How to create the function, you could see here.


How to get data from 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 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 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





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' '~