Hello,
I have made a web-screen where I'm using a web block. I want to fetch the data from web block(child) to the web-screen (parent).In the preparation of the web block, I'm fetching data from an entity and displaying in the web-block as form edit and thats it. The requirement is I cannot use any new action like button, tick-marks etc inside the web block, ie.. the web block is only to display data to the user. Now there is a submit button in the web-screen (parent). On click of that button (which is in parent screen NOT in web-block), I want to store the data from the web-block (child) which is inside the web-screen (parent) into another entity.
It will really appreciable if someone explains the solution.
note: if anyone wants to answer as for using Notify or NotifyMessage, Where do I use it? Remember, I'm not using any new action in my web-block.
How do I do it ?????
You can do it with a bit of trickery (hence I don't recommend this pattern):
Hello Joao Pedri Abreu,
Can you Please provide me a OML file for this.
Even i am too looking for this solution, not able to generate it.
Thanks:)
From, JK-20
Beeta, I must know: why are the requirements like this? It is making the problem excessively difficult for no imaginable benefit in my mind. Every solution I can come up with, there must be some action in the web block. I think you could use the Event System forge component (https://www.outsystems.com/forge/component/597/event-system/) to trigger a "save" action in the child web block, but you would need an action to save the element in the web block.
Beeta, I have attached a module using the above forge component as part of the solution. This is the best solution I can think of without adding any buttons to the web block (but I hope the "SaveRecord" action and the invisible screen action invocation web block are acceptable).
Hi Beeta Sahoo,
I'm with Grayson... I don't really such restrictive requirements. But I have to ask... if the web block is displaying data from an entity record... why not fetch that entity record (again) on the action that your web screen button executes? This way you get the data to copy to your other entity and don't have to touch the web block at all.
Hi Beeta,
Please try to make things simple as Jorge suggested you can fetch the data again fro database which are displayed in webblock on click of save action on parent screen in such way you do not need to do any extra activities.
Regards
-SK-
Hello All,
Thank you, João, Grayson, Jorge and Shashi for your kind replies and sorry for the late reply.
I think everyone is more concern about how there is such a requirement. I will definitely talk about this.
firstly, let me go through these solutions and try with myself and I will be right back.
Hello There everyone, I tried the solution what João suggested. I created a button in the web block and inside that button, I have performed operations to store the data to the entity.
And in main web screen when I'm using that web block, I'm hiding that button which is in the web block with CSS code. It's a hidden button now. I'm giving that class name of the button as "hiddenButton".
Now in the main button which is inside the web screen. I'm calling the hidden button with this javascript code and the code is as follows :
SyntaxEditor Code Snippet
"var els = document.getElementsByClassName('hiddenButton'); els[0].click();"
So when the user is clicking to the button from the web screen, both the buttons are getting clicked at the same time. So by this, the things are achievable.
Thanks, João and thanks to everyone for your kind suggestions. Really appreciate.
Hello, I wonder if you still have a Module that realizes this function. I want to learn from it
Also, if I have multiple Web Blocks (sons), how do I get the values of all Web Blocks (sons) when the user clicks the button from the Web screen
I have been puzzled by this problem all day. I hope you can help me
Thank you very much. Have a nice day