Hi guys a question:
I have a screen and in that screen I have a list that I'm displaying in a table. On the table line I added a edit button. When clicking on that a popup opens and the data from that table row should be visible in a edit web block. In the web block the data can be changed and when pressing save the popup should close and the table record should be changed. Below the table is a save button to save all the data to the database.
So what I did was doing a input parameter on the web block of a record. Then when pressing save passing that record back by the event. Then change the current row of the table with the value from the web block. Only when I have 2 records and I change the second when the event returns the value from the web block the current row number is 0 instead of 1 so the first record is being updated.
Do you have any other idea on how to do this?
Hi,
Try to keep clicked row's number in screen parameter named like ClickedRowNumber. And when you want to update row after popup is closed you have to use TableRecord[ClickedRowNumber] row instead of TableRecord.Current.
I hope it will help.
TableRecord[ClickedRowNumber] this is not something that can be used in a assign right?
freek wrote:
Please check attached oml. It can be used in assign.
instead you can check the correct record to update on the handler action( created in the parent) as we can pass the edited row with its identifier from the webblock's event. I have attached a sample oml file with this feature implemented for your reference.
Thanks,
Praveen Kumar Natarajan
Hi Praveen, in your example your working with data that is already stored in the database. In my case only at the end it's going to be stored in the database before it's just data in the screen. So I think your example is not suitable. :(