Add Number from a table to a stock in another table

Hello All,

I have a doc where I would like to perform some inventory management.

I have stock table where I would like to have a view of all the Models I have in stock based on their site locations.

I have a procurement table where I list the open orders based on the models as well.

When I consider a model delivered in the procurement table I would like to press a button that add the units ordered to the inventory in the stock table

I created the following formula but nothing happens

image

Thank you for your help

Little extra: the button should be disabled once the units ordered have been added already

hi @Johan_Bertin ,

What about trying this (or the correctly spelled version of it using thisRow:


ModifyRows(Stock.Filter(name_model.Contains(thisRow.Model) and Site.Contains(thisRow.Site Delivery),Stock.Inventory,Sums(Stock.Inventory,thisRow.Units ordered)

On top, Contains() offers more insights and although " + " works, Iā€™ d rather use Sum()

Hope it helps, Cheers, Christiaan

Yeah - your key issue is that in your filter formula the first argument is trying to compre two different data types.

You asked your formula to find rows in the stocks table where name_model=model BUT name_model is a text value and model is a row value.

Therefore, you filter formula will find NO rows matching that criteria and modify nothing.

Thank you both for your prompt answer.

@Christiaan_Huizer I applied your formula. It definitely makes more sense

@Scott_Collier-Weir I changed the column type to be both row value but when I execute the button I get the following

image

Any chance you can share the doc?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.