Please help for my scenario!

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dominic_ng
Posts: 5
Joined: 2014-02-24 07:16

Please help for my scenario!

Post by dominic_ng » 2014-02-25 04:36

Ok, I'm moving from Knack which very useful for me to create Product Costing and Process Management. Now I'm trying to build same application via AppGini but still miss some knowledge and tips. My application quite lot of table but in general here is the main function and formula I will ask as a sample. This is the scenario:

Table 1: Fabric
It will contain: ID, Fabric Name, Fabric Price
Table 2: Order
It will contain: ID, Order Number, Order Total (sum all the child/order detail as below)
Table 3: Order Detail (child table of Order - table 2)
It will contain: ID, Order Number (lookup into Order table), Fabric Name (lookup into Fabric table), Fabric Price (lookup into Fabric table), Quantity (manual input), Total (calculation with the formula fabric * quantity)

Here is the sample of an order:
Say we will have order as Order Number= ON001 and it contain several detail in table 3

Order # Fabric Name Fabric Price Quantity Total
ON001 Single Jersey 10usd 2 20
ON001 French Terry 15usd 4 60
ON001 Poliester 5usd 10 50

As the detail of order ON001, the grand total of this order will be 130usd. So the question is:
on table 3 after choosing fabric name: how to get the fabric price automatically?
in Total table 3 I can do it easily (please update the tutorial in the site because in AppGini 5.23, the code was changed a bit so I was confuse)
in Order Total Table 2 how can i sum up all the total in table 3 which match with order # ON001?

My app located on Knack more complex because it contain more table but generally just those function and formula above (sum up all the child table) and auto get value after choosing an item.

Finally, a small question: why AppGini did not include the formula field like quantity * price, and/or sum/average/max/min... the child table. This is quite basic when using app builder to build a simple app. Of course as the tips, we can do it, but after override re-generate, the code disappear. In case we need to update the app for some more functions, we have to find and write again this little hack code.

Thanks!

Post Reply