editable table record, shopping list, reactive


i have 4 tables (fornecedores, Produtos, Order, OrderItem)

I want to build a screen that whenever the user choose a "fornecedor" in the combo box it displays all the products that have this "fornecedor"               This is working fine


i also want to be able to create the orderItem record by whenever the user change the textbox Qtd.
So when Save button is pressed, the order will have only with the orderItems that have Qtd more than 1.

PS: the Qtd attribute doesn't exist in the table products, only in orderItems

Hey Tiago,

I would advise to not have a save action on change, since you'll be making server calls every time the value changes. These are unnecessary server calls, and can cause errors, since it can save values you don't want.

You can have that in memory, ex: having a calculated attribute in the source aggregate of that table, and just assigning that value to the quantity input you have there. Then, in the save action, you just need to filter where quantity <> 0

Without looking at your code, I can't be sure if this is the best solution, but if you have the order item record in that table, you can also just assign the value without saving it in the database.


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