Hi Team ,
I want to list out all the available web blocks(organized in any manner ) in main content at runtime as below ,
If checkbox is selected then no print class should be applied to that specific block .
Please suggest any possible solution , we can use only JS and no JQ.
Thanks,
Santosh
Hi Santosh.
Your requirements are not yet clear. I didn't understand about WebBlock1 and WebBlock2 options.
From the table it seems you've:
Selecting some checkboxes and pressing some imaginary button. On click, it should print something. What you want to print? The contents on the left column cell? If they selected two checkboxes, then two web blocks printed in one print sheet?
Kindly provide more information on what are you trying to achieve.
Are you trying to implement something like this? https://www.outsystems.com/forge/component-overview/13380/printout-library
Hi Ravi ,
Thanks for your reply , the first column(Name ) will have names of all the web blocks available in main content and DoPrint column will have checkboxes where if I select checkbox in first row that will apply Print class to first web block .
Hi Santosh,
From my understanding, it is not a big deal to fix this. On click of Print button, you need to go through all checkbox and find which ones are selected. Then based on the selected list, add a class name to specific UI containers on your web page. With adding that class name on the containers, you can then do whatever custom CSS you need for printing them. Then add a small javascript to actually do print.
Please share your current OML file so I can suggest the modificaitons you need to make on it. Share it here even if it's not working completely, so I can explain you without architecting a whole new app with all best practices.
Small issues like these can be more explanable if someone suggest you only specific things to change in your app, rather than sending you a brand new app to refer and understand.
Hi Ravi,
I am blocked on creating generic layout for printable web blocks and not able to get the list as mentioned above .
Please check the OML .
Hello
Here the list
Hey Vaz ,
Thanks for your help . Can we create a layout for blocks in such a way that , we never need to use , "div[data-block^=SampleData]"
for(let i=0; i < names.length; i++){ const record = { name: names[i].id } records.push(record)
I tried same approach in past .The problem with this code is it works fine in POC . But if I integrate it in environment where we have security integrated. ID will be empty at run time .
SO we need layout for each web block , where it will have block data as well as Name/ ID bound to it at design time .