Hello, I am using the Order Capture App Sample, and I have been able to edit it so far. What I am trying to do is to validate the Inventory available with the request value. This means when I click on Save the order, I want to get a message like “The order you want to place cannot be saved because is not available in our inventory”, something like that. Since the App sample have the columns Total Available Total Request and Total Inventory, I think this is something I can do, but I dont know how. I am not sure if this is an Action or Behavior, or what exactly is. Thanks for your help.
With the Order Capture sample app, To do that, you need to do:
Create a virtual column in the Order Detail table, lets call this [Total Inventory]
ANY(SELECT(Products[Total Available], [_THISROW].[Product ID]=[Product ID]))
Still in the Order detail table, to the [Quantity], use Valid_If:
[_THIS]<=[Total Inventory]and with Invalid value error : "The order you want to place cannot be saved because is not available in our inventory”
The virtual column isn’t strictly necessary:
[_THIS]<=ANY(SELECT(Products[Total Available], [_THISROW].[Product ID]=[Product ID]))
Ahhhhh… I see now… Thanks @Steve
Thanks for your help, I will try that
Steve, where should I write that formula?
At the Valid_if of [Quantity], like my step#3.