13
Views
3
Comments
Web Block Source Code

how I could get a web block Html source code to use it on other web screens.

for example, I have 5 web blocks depend on the specific value on a screen I want to call a suitable web block. 

I don't want to use it (if widget). 

Rank: #101

Hi,


I don't believe that solution is possible.

But, why you don't want to use ifs? Can you give us more details about your use case? 

Because with that (using html directly) you are loosing great capabilities provided by the outsystems accelerators and you are programming "against" the Outsystems principles. The idea is to not need to use native languages and/or technologies.


Thanks!


Best regards,

Ricardo M Pereira

mvp_badge
MVP
Rank: #69

Hello Balqis.

Sorry, but the moment you say "depend on the specific value" you need an if. And html is way harder to maintain than web blocks.

What you can do is have a main WebBlock that hides the ifs and selects which of the five web blocks to use.

This way the information is better organized and the main screen only calls one web block.

Rank: #7590

Hi Balqis,

You can get HTML source code of webblock by using this Action: 

However if you use this way to render webblock dynamically, you cannot (or hardly) to handle the event of webblocks.

So my advice is to use If block to hide or show web block dynamically on screen.

Hope this help.