This community is for professionals and enthusiasts of the Genio platform.
Share your questions and challenges, and help your partners!


Carlos Nogueira
On 2/17/20, 4:33 PM


It's not clear in your model if one instance of your product ('Artigo') represents a generic item that will generate multiple sells or if it's meant to be a representation of an individual item and it's unique (and therefore can only be sold once).

If the first is true, you might need to add a stock management, where sales decrease and supplies increase stock values, so that you know when it's 'sold out' (stock equals zero). 

If the last is true, the formula that counts related records (SR) from related tables applied directly to the 'sold' field will grant what you need ([SALES->1]).

Hope this helps,

Rodrigo Serafim
On 2/14/20, 4:27 PM

Its probably more informative to know how many times an item has been sold. You can achieve that easily by adding a new related sum field to the 'Artigos' table. Call it 'NumSales' for example. You should use a 'Related Sum' type of formula and count the number of rows of 'Sales':


If you want to have boolean notion of each item having been sold or not you can then set the 'Vendido' field as an 'Arithmetic' formula based on the value of the previous field:

iif([ARTIG->NUMSALES]==0, 0, 1)

But this might be a bit redundant now that you have a count of the number of sales.

Keep Informed

About the Community

This platform is for beginners and experts willing to share their Genio knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers. Read Guidelines

Question tools

16 follower(s)


Asked: 2/14/20, 12:13 PM
Seen: 1348 times
Last updated: 2/17/20, 4:33 PM