Related columns in xlsx

I have a recursive table that manages stock. It is recursive in the way that the same stock can be used as ingredients through another table which connects the stock id's as ingredients and as products adding new products to the same stock table:

Product A is used as an ingredient for product B
Product C is used as an ingredient for product D
Product E is used as an ingredient for product F

And to top things off:
Product B, D and F are used as ingredients for product G

Stock table contains Products: A, B, C, D, E, F and G and are related to each other through another table.

I would like to be able to have a button connected to a certain row/product that sends an email with an xlsx format as an attachment containing all related products filtered by the id of the row/product the button is clicked on. I haven't been able to get the id of that row the button is linked to. I'm using this formula, but right now it selects all products instead of only that certain row/product:

<<Start: FILTER('stock', IN([id], LIST([Related stockdeltas By idingredient][id])))>><<[productcode]>>

I have a feeling I'm completely missing the point on how to do this correctly and efficiently. I'm still working on the first chain from product A to product B and I hope if I understand this that I could figure how to show the last part from product B, D and F to product G.

Does someone have experience with this?

Thanks!

0 4 84
4 REPLIES 4

Found it:

<<Start: [Related stockdeltas By idingredient]>><<[productcode]>>
<<[Whatever columns you need]>>
<<[Last column]>><<End>>

Now I just need how to get the hard part into the table: Product G.

<<Start:[Related stockdeltas By idingredient]+[Related stockdeltas By idingredient][Related stockdeltas By idingredient]>>

[Related stockdeltas By idingredient][Related stockdeltas By idingredient] does not exist.

I think it should be [Related stockdeltas By idingredient][idproduct].[Related stockdeltas By idingredient], but I've had this problem somewhere else. I had to make another column as an extra step, because it dit would not work in one column:

[extra column] = [Related stockdeltas By idingredient][idproduct]

and then:

[extracolumn][Related stockdeltas By idingredient]

But I still can't seem to make it work..

I'll try some filters next time, time to sleep..

Because product G contains product B, D and F, I wanted to put some of the columns behind it instead of underneath as a row (I assume that is what this formula does) with kilo's for ingredient and kilo's produced, etc., which I have a possible solution for in mind. If it does not work, I'll be using this.

I will be needing your sollution later as well for what has been sold to all customers, so thank you very much! I haven't tried it yet though, but I assume this is the way it works! I'll let you know.

Top Labels in this Space