Skip to main content
Solved

How does the Formula Automation work with Connected DataBase Fields?

  • March 25, 2025
  • 1 reply
  • 13 views

genietim
Forum|alt.badge.img+12

Pipefy Automations don’t limit me when inputting formulas for the formula automation.

That makes me a bit confused, since I cannot imagine how certain things work, and I would be thankful for clear description.

 

Example of where the confusion comes in:

Let’s say I have a pipe, Sales, and a connected Database, Products, each with a price and a quantity. Consequently, for a card in Sales with multiple Products, one can argue price and quantity to be vectors. If I do SUM(MULTIPLY(price, quantity)), do I get the toal price of a card in Sales with all the connected Products, or does it work differently and e.g. MULTIPLY does a cross product rather than a component-wise multipication?

And what if I say I have two connected databases with different numbers of entries, i.e., I separate Products and Quantity into two databases and the user can select just one Product but multiple quantities – does the product price vector automatically scale to the size of the quantity, or the quantity vector to the size of the products?

Best answer by marcelo.shiba

For connected cards/records, automated formula just replaces the connection by its value.

Then, something like `MULTIPLY(price, quantity)` ends up as `MULTIPLY(price1, price2, price3, quantity1, quantity2)` (the same as `price1 * price2 * price3 * quantity1 * quantity2` ). And that is clearly not what you are expecting. 😕

For your scenario, maybe it would be the case to create some pairs of price and quantity (then it isn’t unlimited anymore) for each item, calculate the subtotal for each item (with a formula for each of them) and only then calculate the sum (another formula). 🤔

View original
Did this topic help you find an answer to your question?

marcelo.shiba
Pipefy Staff

For connected cards/records, automated formula just replaces the connection by its value.

Then, something like `MULTIPLY(price, quantity)` ends up as `MULTIPLY(price1, price2, price3, quantity1, quantity2)` (the same as `price1 * price2 * price3 * quantity1 * quantity2` ). And that is clearly not what you are expecting. 😕

For your scenario, maybe it would be the case to create some pairs of price and quantity (then it isn’t unlimited anymore) for each item, calculate the subtotal for each item (with a formula for each of them) and only then calculate the sum (another formula). 🤔


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings