Interesting Problem with Edit Text Event

0
I am developing an application where I have the following items: A list view that fetches product names from a Data Model (Products Table- attributes ‘Product Name’ and ‘Price’). A dataview enclosed in the list view that takes user input for Quantity (Part of separate Entity ‘OrderDetailsTable’ ). When the user enters the quantity it triggers a microflow (On change Event- for Edit Text) which crates the object of OrderDetailsTable. Problem- When I enter the quantity of the first item(There are 5 items total on the Page), the microflow is triggered BUT as I tab or switch to the next item to enter the quantity input, the first Item is getting reset to 0 only In UI but backend DB is behaving as expected. This is causing negative user experience on the ‘Take Order’ Input form. Please help.
asked
5 answers
0

A bit of a workaround, but why not create all OrderDetailsTable objects before opening the page?

This saves the trouble of managing on change events.

answered
0

Probably there is no association set between the OrderDetailsTable-object (usually named ‘Orderline’) and the Product-object.

My approach would be to, upon opening the page, create the order-object, create a non-persistent entity with all product-objects that you want the user to choose from showing name, number and quantity and have those products be associated to the order that the user is creating. The onChange will still do its magic and keep the quantities in view.

answered
0

Domain Model for the Application is attached here

answered
0

Page Structure for the page taking orders from the user, the {Name} comes from a Database which is filled by a Rest API and has static values (Name,Price)

answered
0

Your JsonObject has many OrderDetailsTable-objects that it can refer to, therefor the view OrderDetailsTable is empty and the OnChange will leave it empty again.

answered