Hi, I am using a calculated attribute to calculate the total price of an orderline. Above you can see the 3 most important entities. For the entity "Inkooporderregel” and the attribute "Inkooporderregel_totaalprijs" Meaning the totale price i wanted it to be calculated. Above you can see the attribute details. As you can see i want it to be calculated with a microflow. Above you can see the microflow i used. The calculation i used is the price of the article times the total the article is needed. The problem i have: Here you can see the application. When i go to the data of Inkooporderregel and press the new button i get an error message saying i should contact my system administrator. It only happens when i press the new button. So what i did was i removed the microflow and made it NOT calculated and it worked pressing the new. I created 3 exameples then and i put the microfloe back as calculated but it did work for the 3 examples but again if i pressed the new button. It showed the message i should contact my system administrator. HELP
Ayman El Filali
When you create a new record no article has been yet selected and the calculation cannot be performed.
You should handle in the calculate attribute Microflow the flow when no article is found (add a split which checks if article is empty, if it’s empty return a default value instead of the calculation. If there is no quantity yet, the calculation can’t be performed either.
Edit: please note that the calculated attribute is always calculated when the object is used (on pages, flows etc.) which impacts performance, please consider if this calculation can be stored (e.g. when saving the orderline, check if the data is available before performing the calculation, perform the calculation, change object and store the outcome in the object, commit the object).
It would help if you also posted the exact error you got. But my hunch is that one of those objects are empty. You might want to check first in your calculation if both objects are there. Because multiply by empty is probably the reason for the error.