How to run action block from Main Screen
Question
Application Type
Reactive

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.

mvp_badge
MVP
Solution

Hi ,

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

Thank you @Rahul Sahu and @Khuong Truong . it helps me.


Hi,

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.

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