I have a table called Orders and the key is Order No + Delivery Number so a Computed Key is generated CONCATENATE([Order No],": ",[Delivery No]).
I have a table called Order Details which has a key called Request No.
An Order can have multiple Requests.
I am struggling with relating the 2 tables. I was able to do this when Order No was the key but now I have a multi column key and not sure what columns I need in Order Details to link the 2 tables.
In simple terms all you show need is:
Order Table
[OrderID] = TEXT , Initial_Value=UniqueID()
[Order Details]
โฆ
OrderDetails Table
[Order] = REF
[OrderDetailsID] = TEXT , Initial_Value=UniqueID()
[Details]
โฆ
Without seeing exactly how youโve got it setup, trying changing you App to be like the above then remove and re-add the OrderDetails table as that creates an automatic Ref. Probably easier and quicker than trying to fix it manually, until you get more experienced with Appsheet
My original setup was as follows which worked fine
Orders
[Ordered Id] - Key
Order Details - ref
โฆ
Order Details
[Request No]
[Order Id]
โฆ
I now need a second key as an Order can be split into 2 deliveries.
E.g Order No 100 with 10 requests arrives short with only 5 items so another Order is needed but it needs to keep the same Order No for the Accounts dept so when the order is first created it now has a delivery No to make it unique
Order No Del No Qty Ordered
100 1 10
100 2 5
200 1 20
Orders
[Order Id] -Key
[Delivery No] - Key
?? Ref
โฆ
Order Details
[Request No] - Key
[Order No]
[Del No]
???
So hereโs what Iโd do. Firstly Iโm going to suggest renaming the second table to Item since that clearly indicates each row is one item
Order
[OrderID]
[Order Number]
Items
[Order]=REF
[ItemID]
[Item]
[Amount]
Deliveries
[Order]=REF
[DeliveryID]
[Delivery No]
[Date]
[Item]
[Amount]
They need linking like this
Order
|
-----------
| |
Item * * * * * * * Deliveries
ignore the *'s its just to get the formatting right
So to keep a running tally you now just create a formula that takes the Item total and deducts off all deliveries
Item[Remaining] = [Amount] - SUM(Select(Deliveries[Amount],[Order]=[_ThisRow].[Order]))
Hope this helps
Thanks, donโt think this will work for us, our processes are slightly more complicated but I think I have a solution that I am testing out.
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |