Which variable to use?

Hi,

I want to call the existing order of the database. to change an order.

-user use edit order screen, to edit an order from a customer

-the order existing in the database

-when changing an order you can remove products and add products.


My problem is only with the prices. the total and the total price order.

I don't know which variable must have i use.


the result should be:

I think you should fetch the order details along with products from database first.

Then maintain a local list to hold the product list in the order and a variable to show the total price. If user makes any changes in the product then you need to update this list and total price in this variable.

After that at last on click of update button you can copy data from local variable to your entity variable which going to be store in database.

OR

while showing the data, in total price variable you need to show the total of all product prices * quantity of each product. Now if user make any change in any product in the onchange event recalculate the total value.


regards

Which screen event can i use for setting the value of the variable?

Hi KA,

I recommend you read this article to learn how to use events in outsystems this may solve your problem.

regards,


NOTE: If you need understand about the Screen and Block Lifecycle Events this might help you

hello , it is solved already?
if not, please share your oml so we can fix it .

Best Regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.