Batch transferring between tanks

I have an issue with my brewery app when it comes to transferring batches between tanks and was wondering if anyone might know how to solve. In the brewery I work at Iโ€™ve made a batches table for a record of all the batches we create. I also have a batch movement table which shows a record of the movement of batches between tanks as we filter a batch or move it for some other reason. Then I want the current status of tanks(Which batches it contains and the volume) to be displayed as some slice or in a different place holder table. The issue Iโ€™m running into is the fact that the tanks have different volumes so it canโ€™t be simple tank number swap. It has to be some volume transferring from tank to tank and then if the entire tank is transferred only then can the previous tank can be set to empty. Otherwise both tanks contain some volume of the same batch. The tank can also partially be packaged from or completely emptied with packaging. The way I thought about it at this stage is I have a third Occupancy table that is UPDATE_ONLY which contains my tanks and then as Batch Movements or packaging take place I change the data in the tanks with referenced actions but I have been unable to get it to work. Any help in this regard would be greatly appreciated.

. [F.V_ID] in batches as well as [To F.V_ID] in Batch Movement is a reference to a slice of empty tanks from occupancy. From [F.V_ID] in Batch Movement is a reference to a slice of non-empty tanks from occupancy.

0 2 415
2 REPLIES 2

Hi @Heino_Matthee What referenced actions were you using and why didnt they work? Did you get any error messages?

I got it to work now with a SetBatch action to set the batch of a tank to the most recent batch movement batch number with
INDEX(Batch Movement[BatchNo_ID], Count(Batch Movement[BatchNo_ID])).

With the reference action expression being
SELECT(Occupancy[F.V], [F.V] = [_THISROW].[To F.V_ID])

Previously I tried to get a SetBatch Expression to select a specific BatchNo to the movement in question but this most recent approach is working for me. Iโ€™ll post here if I run into any other troubles as I still have a lot to figure out. I.E getting tanks to be set to empty based on the volume transferred.

Top Labels in this Space