Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Paulo Moreira Mendes
3
Views
2
Comments
How to update a single Record in a Record List using Ajax
Question
Hi everyone!
I wanted to update only one row in a Record List from a popup editor using Ajax in SS 7.0.0.15. To test my approach, I did the following example:
I've defined the Save button as follows:
But it didn't work.
Anybody knows what’s wrong in this procedure?
To solve this problem I did a workaround converting the updated record to xml format and sending it by message to the OnNotifyEdit and than rebuild it and assign it to the Record List. I know it is also possible to send only the id of the updated record to OnNotifyEdit but In that case I would be forced to do a new query to get the record from db.
Best Regards
Mário Araújo
Hi Paulo,
In your question you mean "Updating a sigle record from a TableRecords list" right?
First of all, it was not clear to me what you were trying to optimize here:
Are you worried about Querying the database again due to performance issues? Is querying the database that second time out of question for you? Why is that?
Are you worried about refreshing the full table because you think it's bad for the end-user to have a full table refresh?
Anyway, from a develoment perspective, converting to XML is a huge overkill. In my humble oppinion here's how you should do it:
Do your update inside the Popup/Save, notify and close.
In the parent page (OnNotify action), refresh your query and do an Ajax Refresh on the table.
If you really need to update that single row, maybe you can add an input parameter to the Popup and set it with the current Row Number. Then, return it back with the Popup_Editor_Notify event to the parent and use it to set the "RowNumber" property of the "Ajax Refresh" for the table.
Cheers,
Mário
1 reply
16 Feb 2013
Show thread
Hide thread
Paulo Moreira Mendes
Hi Mario,
Thanks for your help. In fact the problem is already solved according to your suggestions. I wasn’t sure if that approach is correct but I'm now convinced!I was trying to minimize the number of query to improve the performance. Since then, I learned a lot about performance in Outsystems.
Thanks again,
Paulo Moreira Mendes
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...