Hi ,
I am facing one problem , i want to call block action from main screen but not able to do it.
Is there any way.
Thanks in Advance.
You can go with this document
How to Call a Block Action in a Mobile Screen - OutSystems
OR you can try -
1. Create a button on block and bind action
2. Hide this button by css (display:none) and provide a class for this button.
3. From main screen you can use one Button to call this action and use this JS for it-
var x = document.getElementsByClassName("ButtonClass");
var i;
for (i = 0; i < x.length; i++) {
x[i].click();
}
Hope this will help you.
Regards
Rahul
Hi,
You can try:
1. Create an input for the block. It can be isTriggered (boolean and default = false).
2. Call block's Action inside OnParameterChanged event of the block.
3. Trigger block's Action by update isTriggered from main screen.
Cheers,
Khuong
Hello Can you please explain this in brief?
Thanks @Rahul Sahu this helped me.
Thank you @Rahul Sahu and @Khuong Truong . it helps me.
I prefer Khuong's post, it is much easier to maintain in this way, if we use JS to do this, we may pay attention when we try to do a change.
A bit older post but just to add my two cents.. What I use to for e.g. saving blocks contents is a variant on what Khuong suggested: