Use a field from one module in another module's formula field

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