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

(Ct Chung) #1

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.

(Simon Robinson) #2

Is T1_F a virtual column?

(Ct Chung) #3

@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

(Simon Robinson) #4

That shouldn’t cause a problem.

But you’d

need a Sum(Select(… to read each sub table.

Something like

Sum(Select(…)) + Sum(Select(…))

(Ct Chung) #5

@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.

(Simon Robinson) #6

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

(Ct Chung) #7

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

(Simon Robinson) #8

Just so I’m clear…

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

(Ct Chung) #9

@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…

(Simon Robinson) #10

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

(Ct Chung) #11

@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.

(Ct Chung) #12


(Ct Chung) #13

@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…