Default Value in Add Order Detail Form

I'm Trying to set the Default UnitPrice value in the Add Order Detail Form (OrderDetail.UnitPrice to Product.UnitPrice), using

${getByProductsForProductIdResult.UnitPrice}. This works great in the Edit Order Detail Form, not so much in the Add Order Detail Form. How Do you set this Default?

Also, how do you filter The Add Order Detail Form to only the Products from the selected Vendor from the Order.


As far as I understand you need first to choose the Product if you want to set Order Details UnitPrice to be the same as Product UnitPrice. If you convert the Add Order Details Form to TemplateForm you can handle Change event of the Product DropDown and set a Page property to Product UnitPrice that can be used as Value of UnitPrice input. You can also use the same technique for Orders DropDown to save selected order and use it in $filter parameter for the invoke which will get Products.