How to add the sum of related transactions?

  1. I am developing an inventory management app, which wants to show what items are put in each and every location.

  2. I created a transaction table which records all the items, in and out qty, with their respective locations.

  3. When I try to link the location table with the transaction table, the relevant transactions were retrieved. However, the system fail to add the sum of the same items available in the same location. Therefore, i cannot check the total quantity in the location form.

  4. In this example, product โ€œS10150โ€ were added to location โ€œ1L1Aโ€ โ€‹for
    โ€‹2 times each of 100pcs. I wish to show that the available products in location โ€œ1L1Aโ€ are:

  • S10150 = 200pcs
  • S10161 = 100pcs
  • S10184 = 100pcs

May I ask how to do it?

Tables in this app (attributes):
i. Product (ProductID, Product name)
ii. Location (Location)
iii. Transaction (DateTime, ProductID, Location, Quantity_change, User)

I am actually thinking if i should add a virtual column in โ€˜Transactionโ€™ table, namely โ€œtotal_qtyโ€. Therefore, the โ€œtotal_qtyโ€ should equal the sum of โ€œQuantity_changeโ€ if the productID and Location match the row. But I donโ€™t know how to code this.

I would be very grateful if anyone can advise me ><

0 10 333
10 REPLIES 10

I would like to suggest amending the Inline View and selecting a Group Aggregate.

3X_c_8_c8dbfb528bcb1f5a7c0cf3ac2efbb88913f4a140.png

In there, you may find SUM ::Qty_change.

thx for the advise. I tried already. Still cannot display the sum only.

May i ask how to create โ€œinline_viewโ€?

Do you mean after clicking โ€œlocationโ€, the UI should jump to this โ€œinline_viewโ€?

Sorry, i am very new to appsheet. Thx for your patience and kindness ^^

My app looks like this.

Do you mean the UI can look like yours after clicking this โ€œ1L1Aโ€?

I tried to do the same setting as you did. but i couldnt make it. @ Chris_Jeal

Hi,

Inline views are auto-created by Appsheet.

Once in your location row open up the current Inline View:

Then, select the view details by clicking on the view name:

Here you amend the view itself and perhaps use the below to give the desired UI:

Hi Chris @Chris_Jeal

You are really professional!! and thx for your instruction that helps me edit the inline view.

It did calculate the sum. But the problem now is i am interested to know the sum of each item, not the details. When i have over 1000pcs of transactions, it will not be convenient for my staff to do counting merely by referring to the sum of each item. Is there anyway that i can hide the transaction details?

Actually i have created another form โ€œHistoryโ€ for my staff to refer to the full transactions details. So i just want a brief in the location page for inventory counting purpose.

Repeat the group by

@SkrOYC

You are so smart!!! thx for your help!!!

Top Labels in this Space