As per title, I want to set a field's value (a datacard in a form) to a value I have calculated on the push of a button.
Scenario:
This is an app for taking menu orders. First, the OrderHeader is populated (Cust Name, time, discount, amount paid).
Next, the OrderDetail is populated (Menu Item, Quantity, OrderHeaderID).
Finally, when the customer is ready to pay, we open OrderHeader again in Edit mode. The screen allows for a discount to be selected. A label on the screen has a formula which calculates the total of the OrderDetail for the selected customer less any discount.
I want the user to be able to accept the calculated amount by clicking a button or type in a value manually if, for some reason, the amount paid does not match the calculated amount.
I have all this working except populating the field's value by clicking the button. Can anyone give me a hint how to proceed?
Cheers
Paul