Hi,

Say there are two modules. A and B. I created a field called x in the module A. I created a field called y and z in module B. y is a formula field and z is a normal integer field. Now, the formula for y = x*z. How do I achieve this in Corteza?

Hi,

Say there are two modules. A and B. I created a field called x in the module A. I created a field called y and z in module B. y is a formula field and z is a normal integer field. Now, the formula for y = x*z. How do I achieve this in Corteza?

Formula fields and query expression currently can not directly access values from related records.

**If you want to use a formula fieldâ€¦**

Youâ€™ll need to write an automation to copy the required values from the related record into the other record (so values from B into A in your case).

From there, the formula field expression should be trivial.

**If you want to use automation**

You can configure a simple workflow or automation script to do the calculation in place of the formula field.

This is what we usually do when we need something like that.

Itâ€™s not the most elegant solution, but it gets the job done until we expand field expressions and query expressions.

Thank you, Do you have a video explaining these workflows and on how to use them for different use cases? There are many things and the documentation is too technical for a beginner.

1 Like

Maybe example workflows can help you, thereâ€™s a workfow called â€śCRM - Contact - Set Labelâ€ť that constructs a label in one module from related data in another.

1 Like

There are some videos here but not specific to workflows â€“ linking it here more because why notâ€¦

Iâ€™d suggest, for now, you come back to the forum with specific questions and weâ€™ll try to help you out