Unable to save data in database from dynamic generated Web Block


I have created a screen which contains, dynamically generated SectionExplandable which internally contains a webblock

Webblock contains an Editable table with label and a dropdown. Please check the image below.

All the data is a part of a same table.

Can someone help me in saving the data on a single button click.

Thanks & Regards, 

Anthony D'souza

Note: I am very much new to OutSystems, if there any tutorial links to understand the concept please do share in your replies :)

Hi Anthony Dsouza,

To answer you, I remember 3 different approaches.

  1. Since you have the button on the parent screen, the simplest way is to notify your parent screen with the updated data from the list. Bear in mind that you should have somehow a way to identify the most recent data on parent screen to be saved. Once you click the save button you'll have all the data on your parent screen and you will be able to save it.
  2. You can have an hidden link inside the block with a specific class and use RunJavascript action from HttpRequestHandler extension to click on those links inside the blocks (Note that this answer is valid if you are in a web application, for mobile and reactive you can call a client action and click on those links using javascript)
  3. You can look at this forge component that allows you to execute an action that lives inside the Webblock from your parent screen action. I've never used it but from the description it seems to handle what you want. (Bear in mind that the description also says that this might stop work with platform updated)

There are probably better ways to do this but those 3 were the ones that I've remembered.

Hope this helps,