How does the parent Web get multiple child Web values at the same time
Question
  • There are multiple child Web in the parent Web

  • Click the Submit of the parent Web to get the input value of all the child Web

  • Thank you

  • Damon

Solution

Hello Wang hao,

Here is the sample for your solution in the attached (.OML) file. 


There are two inputs both are coming from two different web blocks. The data is fetch in the Web screen in a message box.



To fetch the data from multiple web block there are few steps which needs to be followed. 

You can download the OLM for the steps. 


Kindly let me know on this

Thanks,

Ajay Sharma

ParentWebGetMultiplechildWebvalues.oml

hello Ajay Sharma 

This is the onRender method that is executed in the block, so do I need to execute the "on change" method in the webBlock

Thank you for help

I will recommend you to go with onRender only, if you apply onChange then on every key press it will execute the code.

You can try (onChange ) at your end to see the result.


Thanks,

Ajay Sharma. 

Hi Wang,

Could you please explain your requirements in more details and to the point? Since, with these 2 points it is not clear and hard to understand and help you.

Thanks & Kind Regards,

Sachin

How do you do

It's like I have a form that I need to submit and that form exists in the parent Web

But there are multiple child webs in this form that need to get the values of the child webs when they are submitted, and I don't want to do anything in the child webs

Thank you 

Hi wang,

Hope you are doing well.

In outsystems there is concept of Reusable UI where  block(or web block) can be reused at multiple screen. So you can call that web block a child screen where it is used as parent screen. Now Block can be talk to its parents by events. 

For more Please check -

 https://www.outsystems.com/training/courses/121/blocks-and-events/

https://success.outsystems.com/Documentation/11/Developing_an_Application/Design_UI/Reuse_UI


Hope this help.

Regards,

rahul

Hi, rahul

I don't want to manipulate methods in subclasses but I can get data from subclasses 

This is because the page will have animation effects that affect the user experience when executing Son Web's methods 


Thank you 

wang

 But there are multiple child webs in this form that need to get the values of the child webs when they are submitted.

      ---->  when any child webs which are going to be submitted that means Now you have submitted data in database. Use Refresh Data in your parent action flow so that you can get updated data for parent  form submission.


Hope this help.

Thanks


No, there's only input in the child Web that doesn't submit to the database, the submission takes place in the parent Web

if there's only input in child web. It means there should be also some local variable that is holding that inputs.  so if your child webs are not web blocks(or blocks) then that local variables should be accessible in whole screen.

Hi wang,

Hope you are doing well.


Use the same variable name in a both parent and child web, hope thats could help you,,


Solution

Hello Wang hao,

Here is the sample for your solution in the attached (.OML) file. 


There are two inputs both are coming from two different web blocks. The data is fetch in the Web screen in a message box.



To fetch the data from multiple web block there are few steps which needs to be followed. 

You can download the OLM for the steps. 


Kindly let me know on this

Thanks,

Ajay Sharma

ParentWebGetMultiplechildWebvalues.oml

hello Ajay Sharma 

This is the onRender method that is executed in the block, so do I need to execute the "on change" method in the webBlock

Thank you for help

I will recommend you to go with onRender only, if you apply onChange then on every key press it will execute the code.

You can try (onChange ) at your end to see the result.


Thanks,

Ajay Sharma. 

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