Question

When condition is not working (on first click) at ACTION Condition for "Local Action"

I am Using Pega v7.3.1

I have implemented Local Action(Modal Dialog) with condition on 'Click' event of button.
But 'when' condition on action is not working on first click.
On second click, its working and Popup gets populated.

Requirement: On Click of button, Popup should be populated, depending on condition.

Approach: On Click event, we have 6 actions

Action 1: Calling Data Transform.

Action 2: Calling Activity and setting flag 'FlagForPopUp'.

Action 3: Calling Activity.

Action 4: Refresh Current harness.

Action 5: Calling Activity.

Action 6: Calling 'Local Action' based on condition i.e. value of

1)Flag 'FlagForPopUp' (set in Action 2)

2)Checkbox value on UI.

Let us know if have solution.

Thanks in Advance.........

***Edited by Moderator Marissa to update platform capability tags****

Comments

Keep up to date on this post and subscribe to comments

September 12, 2018 - 9:53am

Hello,

Have you tried to trace both clicks? Can you see the difference and why your WHEN condition isn't working the first time?

September 17, 2018 - 2:58am
Response to MarcLasserre_GCS

Yes i tried to trace both clicks. But in tracer not showing WHEN condition.

On first click tracer ran upto:- Action 5: Calling Activity.

On second click tracer ran successfully but not showing WHEN condition in tracer.

 

September 17, 2018 - 4:26am
Response to RahulP07

Well, you should have the WHEN condition been called on tracer. At least for the second click. Did you enable WHEN rules correctly on tracer?

September 17, 2018 - 4:34am
Response to MarcLasserre_GCS

Thanks for reply.

Yes i have enabled WHEN rules correctly on tracer.

September 17, 2018 - 4:49am
Response to RahulP07

Oh yes,

I just look into your screen shots again. You are not using WHEN rules that's why. Can you create real WHEN rules instead of those test on properties you having.

September 17, 2018 - 5:07am
Response to MarcLasserre_GCS

Thanks for reply,

I already tried using real WHEN rule instead of properties(When Condition using 'Other Property'). 

But still same problem occurs. Local action calls on second click only, not on first click.

October 30, 2018 - 6:25am
Response to Raveendra

Thanks for update.

February 12, 2019 - 10:04am

Run the tracer on both clicks and look for ".FlagForPopUp" and ".LRbox1" have values.

I believe that on the first click, the above properties are having their values set and then on second click they are being used for the when conditions.

September 26, 2019 - 1:15am

@RahulP07 - Did your issue resolved? we are experiencing similar issue. Do we have any work around for this?

November 11, 2019 - 8:04am

@RahulP07 - Even we are experiencing the similar issue. Could you please provide the solution, what can be done?

November 12, 2019 - 10:47am