I am doing a inventory app that calculate sto...

I am doing a inventory app that calculate stock position as and when order are process. I have a view that presents a slice version of the inventory in table form.

I have been experiencing an issue that the table is not updated as I wish. For example, I have 10 pcs of stock of an item, I process an order for 4 [T1_Order], so after the order entry is completed. My main inventory should show 6 [T1_F]. However, that is not the case and it puzzled me that what might have gone wrong.

So I did a test to examine the data on the table through the Appsheet Editor immediately after the order is process to see whether it is due to some form of data transmission delay, that the Save function did not write the info fast enough.

The finding surprises me, the data fetch correctly reflect the data have been updated in the table.

However, I do not understand why the data in the slice view which tabulate the same data does not reflect the same?

Any help will be greatly appreciated.

0 12 843
12 REPLIES 12

Is T1_F a virtual column?

@Simon_Robinson Hi Simon, T1_F is a virtual column that does [T1_STK]-[T1_ORDER] where both these source of calculation are also virtual column

That shouldnโ€™t cause a problem.

But youโ€™d

need a Sum(Select(โ€ฆ to read each sub table.

Something like

Sum(Select(โ€ฆ)) + Sum(Select(โ€ฆ))

@Simon_Robinson Yes, I am using quite a fair bit of Sum((Select) between the 3 tables. Anyway, I do not know what I actually change, the latest is that pressing Sync update the value in the Slice now. I have to do more testing.

Have you done a sync to see if this changes it?

@Simon_Robinson Yes I am tried using the Sync button and it does not change.

Just so Iโ€™m clearโ€ฆ

Each row is one order and you want to total up the current stock levels?

@Simon_Robinson Each row is a specific product, the column denotes quantity of stock at various stock location WH (warehouse), T1_F (truck 1) and so on.

T1_F is the free physical stock available on the Truck, it takes physical stock available on truckT1_STK minus those quantity on order T1_ORDER

So, T1_F needs to be right so the sales can dispatch new sales order to truck which has the stockโ€ฆ

Not sure if you have the structure correct on this.

When Iโ€™ve done a similar system I use 2 tables.

Table A contains data where each row is the movement of stock (type, in, out and amount).

Table B then uses virtual column/s with Sum(Select(โ€ฆ Functions to do calculate stock levels

@Simon_Robinson Hi Simon, thanks for your reply. I am new to Appsheet so still learning how it behave.

I cannot rule out the fact that the structure, formula is not perfect and may have some underlying problem.

What I cannot understand through my earlier posting is that why the Slice view will not display the right value despite the fact that the underlying data shown through the data fetch is correct?

Table Products column [T1_F] shows 6 when viewing through the editor show table data function. Slice view on Products T1_F show 10, and Sync wont update it.

@Simon_Robinson Hi Simon, another thing to add is that, I have 3 tables. So not sure how this is going to affect the outcome compare to just 2 tables. The arrangement is the main table is link to the other two, and it is taking info from both to evaluate the virtual columnโ€ฆ

Top Labels in this Space