Automatically fill in data based on dropdown choice

Hi all,

I have 2 tables:
ORDER – OrderID - OrderDate - OrderStatus
ORDERDETAIL – OrderDetailID - OrderID - Product - QtyOrdered - QtyDelivered

I would like the QtyDelivered to be equal to QtyOrdered if OrderStatus = “Complete”

I have tried to add a formula for QtyDelivered like:
if(OrderID.OrderStatus = “Complete”, QtyOrdered,0) in appFormula and initialvalue, but nothing happens…

Any idea?

Many thanks

Matt

Solved Solved
0 9 413
  • UX
1 ACCEPTED SOLUTION

Hi,

I eventually found a way to do what i wanted.

Create an action on the order table:
Data: execute an action on a set of rows
Ref table: OrderDetail
Ref rows: SELECT(OrderDetail[OrderDetailID],[OrderID]=[_THISROW].[OrderID])
Ref action: create an action that update the data you want to update.

Done and dusted!

Matt

View solution in original post

9 REPLIES 9

Steve
Platinum 4
Platinum 4

That’s not doing what you think it is.

Thanks Steve

I am not sure I understand the dereferencing.
I thought I had used it properly in my formula. When I test it, it shows the right result…

Column values are referenced with square bracket notation.
i.e [column] not column

Hi Marc,

The formula i have is as follows:
if([OrderID].[OrderStatus]=“Complete”,[QtyOrdered],0)

Seems to me that dereferencing is used properly and the formula looks correct.

We can’t help you if you misrepresent your app configuration.

Page
New Member

What if…
1 TABLE “Items”
you want to enter a new item, but check to see if item already exists (maybe compare first entry field in form with that column in items?). If it does already exist then switch to its (the already existing item) edit view instead of adding new item, but if it does NOT exist then continue to add info for new item in form.
please help

Hi Page,

I am sorry, but i do not understand your post.

Sorry mate but i struggle to understand.
I have seen the Order Capture sample. And I guess i could give it a go, but i am pretty sure it is not going to do what i want.
I want to be able to fill in the QtyDelivered if it is not fully complete.

In what way am i misrepresenting my app configuration?

Many thanks

Hi,

I eventually found a way to do what i wanted.

Create an action on the order table:
Data: execute an action on a set of rows
Ref table: OrderDetail
Ref rows: SELECT(OrderDetail[OrderDetailID],[OrderID]=[_THISROW].[OrderID])
Ref action: create an action that update the data you want to update.

Done and dusted!

Matt

Top Labels in this Space