pfroelicher

sort a calculated list

Discussion created by pfroelicher on Aug 19, 2012
Latest reply on Aug 22, 2012 by comment

In our MRP system I had to create a textfield called composition containing the ingredients of each formula.

A formula is a "recipe"and contains the ingredients which are in the "products"file to produce each item.

 

we have PRODUCTS

we have FORMULAS

and we have FORMULA_ITEMS, which contains the percentage.

 

For example FORMULA of shampoo XX contains

90% WATER

3% Fragrance X

7% LSS

 

On every cosmetic you have to write the composition on the back. For this product this would read

 

Aqua, sodium laureth sulfate ,rosmarinus officinalis, sodium laureth sulfate / glycol distearate / cocamide mea / peg 10 cetyl alcohol

 

I use this calculation to create this text in the COMPOSITION field.

 

Substitute( List ( fo_itens_PRODUTOS::prod_INCI_name ); ¶;", ")

 

How can I achieve that the List itemsin the COMPOSITION field get written sorted by their percentage. The list I get now is sorted by creation order in the Products file, however I would like to have it created by the percentage each product appears in the formula.

Thank you for you help.

Pierre

Outcomes