Question

Displaying Modal Dialog conditionally doesn't work neither with 'Launch-Local Action' nor with the activity(ProcessAction).

Hi All,

We have a requirement to display modal dialog conditionally, to display we have configured 'Launch-Local Action' with the when rule(when rule checks only for flag) and before launch-local action we are calling an activity wherein we are setting the flag. With this configuration it is not working, so we thought to go with the activity approach, so we are calling "ProcessAction" OOTB activity with the required parameters but that is also not working.

Please let me know if anyone has tried calling "ProcessAction" activity?

Below is the screenshot of configuration.

Thanks in advance!!

***Edited by Moderator Marissa to update categories***

Correct Answer
January 31, 2019 - 3:00am

Hi Sakshis5776
The only solution that will work in your case is

1. Create a input field(lets say .pyNote) in the section from where you are launching this local action.

2. In this field use hidden text control so that it is not visible to users.
3. In your action tab, put the first action as "calling an activity wherein you are setting the flag".

4. In the next step use "Set Value" action and set the hidden control property with the value you got from the activity.

5. Then use this hidden control property value in the local action luanch condition.

I have attached a screenshot for ref.

Thanks

Kamalesh

Comments

Keep up to date on this post and subscribe to comments

Pega
February 21, 2018 - 11:10am

Hi Sakshi,

Thanks for posting on PSC.

Today only, I was facing a similar situation of restricting the flow action to get executed conditionally. 

You can configure it in multiple ways,

As far my understanding you're launching modal dialog from click of a button, 

Solution 1:- How about restricting visibility of this button, but challenge here setting the value of flag as you're doing it through an activity before. 

Solution 2:- Configure an event "Run Activity" before "Local Action" event in your action set from where you intend to launch modal dialog. In the "Run Activity", configure your activity but please verify the value of your flag in clipboard whether it's available or not(You can verify by just having "Run Activity" event first time and then configure both events i.e "Launch Action" and "Run Activity").

The only problem, you may face is the context of your flag property, please check it whether all are under the same context or not, as "Run Activity" event run in present context while "Launch Action" executes in the context mentioned in "Using Page" field, if I am not wrong

Solution 3, 

Your local action for sure is referring to a flow action, you can restrict the flow action availability by adding "When" condition having flag value under "Security" tab of the flow action rule.

But make sure, you have the flag value populated before the flow action execution.

Hope it helps in implementing your requirement, kindly notify if it does by marking this post as answered/helpful for tracking purpose.

Regards,

Asif

March 6, 2018 - 8:53am
Response to Asif Hasan

I tried every solution given above .It did not work still

March 12, 2018 - 2:37pm
Response to Sakshis5776

Hi @Sakshis5776!

You said that you tried the solutions above. Did you happen to try out what @BinduSaraf & @sahuv1 suggested?

Please advise.

Marissa | Community Moderator | Pegasystems Inc.

March 19, 2018 - 4:46am
Response to MarissaRogers

yes

Pega
March 19, 2018 - 6:41am
Response to Sakshis5776

HI Sakshi,

Can you please confirm if you have changed the "streamtype" value to "Rule-HTML-Section" ?

 

Pega
February 21, 2018 - 2:00pm

Hi Sakshi,

I have tried calling the flowaction through processaction activity by passing the parameters as per your screenshots and when i changed the "streamtype" value to "Rule-HTML-Section" the flow action is executed and it is working fine.Can you please update the streamtype parameter value to "Rule-HTML-Section" and try once.

Please find the below screenshot:

Pega
February 22, 2018 - 1:23pm

Hi Sakshi,

If the  flag can be set earlier , then the visiblity condition can be added to the button from where you are trying to launch the localAction else  on click of the button  only sometimes it will open the modal dialog(according to the usecase) and sometimes not.

 

 

January 31, 2019 - 3:00am

Hi Sakshis5776
The only solution that will work in your case is

1. Create a input field(lets say .pyNote) in the section from where you are launching this local action.

2. In this field use hidden text control so that it is not visible to users.
3. In your action tab, put the first action as "calling an activity wherein you are setting the flag".

4. In the next step use "Set Value" action and set the hidden control property with the value you got from the activity.

5. Then use this hidden control property value in the local action luanch condition.

I have attached a screenshot for ref.

Thanks

Kamalesh

September 9, 2019 - 5:32pm
Response to Kamalesh_mohanty

This solution worked to display Modal Dialog conditionally. Thank you!

Thanks,

Mayuri.