tag:blogger.com,1999:blog-1378799219460651126.post1628031265271354423..comments2024-02-29T07:41:47.326+01:00Comments on Vincent Deelen: Custom multi row processing using tabular formAnonymoushttp://www.blogger.com/profile/16016372265566456854noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1378799219460651126.post-6341969595877942292013-06-08T08:58:21.429+02:002013-06-08T08:58:21.429+02:00Hi, Vincent.
I'm glad you liked my suggestion...Hi, Vincent.<br /><br />I'm glad you liked my suggestions.<br /><br />If I may add yet another ...<br /><br />With respect to using your technique while paginating through multiple pages, I've successfully used Apex collections to store all tabular form rows on each page. As users go forward/backward through a tabular form, I save all of the current page's rows in the tabular form to my collection, marking newly added, updated, and deleted rows with the row status "NEW", "UPDATED", and "DELETED", respectively.<br /><br />Finally, when users click a "SAVE ALL CHANGES" button on the page, I use a PLSQL procedure to process these rows: inserting/updating/deleting rows in the target table based on the collection row status.<br /><br />Apex collections are quite useful structures when tabular forms are involved. Indeed, I've used them to create multiple tabular forms on a single page, something that even the most recent Apex version (4.2.1) cannot do.<br /><br />Take care.<br /><br />Elie<br />Eliehttps://www.blogger.com/profile/04759590911714369865noreply@blogger.comtag:blogger.com,1999:blog-1378799219460651126.post-84460454723062672032013-06-07T11:39:09.412+02:002013-06-07T11:39:09.412+02:00Hi Elie,
Thanks for your reply and thank you for ...Hi Elie,<br /><br />Thanks for your reply and thank you for your suggestions. <br />I like your idea of adding an extra dynamic action to track changes in the SAL column. If doing so, you'd have to do keep in mind that users can also change salary of people who don't get a raise. So, you'd have to submit all changes to the SAL column prior to running the raise_sal procedure. Setting the SAL column read only would be a much simpler solution. <br />There are more shortcomings in this example. note that on paginating to the next set of rows, you lose all checked items, so effectively you only update those salaries of checked employees on the current page.<br />My idea was, as you mentioned to provide a simple example of a mechanism to manipulate your tabular form. The emp-table example I provided was in fact the most stripped down running version I could come up with. It should provide a starting point for more complex and robust table handling. I myself have used it, for example, in a transaction system, where I delete prospected transaction from one table, update them and insert them in another table.<br />I hope more people, like you, will be inspired by this blog and hopefully some will share their insights here as well. Again thank you for your insights. <br /><br />Kind regards,<br />VincentAnonymoushttps://www.blogger.com/profile/16016372265566456854noreply@blogger.comtag:blogger.com,1999:blog-1378799219460651126.post-23094555717209050232013-06-07T08:05:52.413+02:002013-06-07T08:05:52.413+02:00Hi, Vincent.
Thank you for posting this. Your cu...Hi, Vincent.<br /><br />Thank you for posting this. Your custom function to update an entire tabular form in one go is really useful (and cool).<br /><br />I tried your example and it works great. I realize that the point of your article is to demonstate updating tabular form in one go. However, for those wanting to use your technique in a production app, I would suggest adding a second dynamic action that fires upon changes to the SAL column and then stores the changed SAL value in its own variable. This way, if users happen to change the SAL value *after* checking the checkbox, then it will be the most recently modified SAL value that is updated by your PLSQL process. Currently, it is only the SAL value *at the time users select the checkbox* that is updated.<br /><br />Another option is to make the SAL column read only so users are prohibited from modifying it.<br /><br />As mentioned, your neat article is not intended to present an entire solution set. I just thought it might help readers understand how to incorporate your technique in a production app.<br /><br />Thank you so much for sharing this technique. I loved it.<br /><br />ElieEliehttps://www.blogger.com/profile/04759590911714369865noreply@blogger.com