@MaxonL16591286 We had a similar requirement(in 8.6) where in we are displaying a list using Menu Rule, and onchange we are running a DT and based on a logic we are setting .IsMessage=true/false. If it is true only we should display the modal dialog. But modal dialog was always showing even if it is false also. So as a work around in the modal dialog section, we added 2 different paragraph rule for displaying positive/negative scenario message(and those 2 were displayed on basis of .IsMessage=true/false). Even though it is an extra click for the end user when IsMessage=false they were fine with that as the message we displayed was meaningful and contextual.
Posted: 9 months ago
Posted: 2 Mar 2023 4:41 EST
Marije Schillern (MarijeSchillern)
Senior Knowledge Management Specialist
@MaxonL16591286 the support article was written to inform users of the correct design methodology. The issue was never recognised as a product defect and hence the behaviour did not change between Pega versions.
Also note that a When rule on Local Action would consider property values only from DOM and not from clipboard. In order to make a scenario work where a when rule is set before calling an activity ,make below local changes :
1) create a "Hidden text" field, say A in the section where button is configured.
2) Call 'Set Value' action before "Local Action" to set the property- A (created in step 1) with activity output value .
3) Check for property - 'A'(defined in step1) on Local action.
Many many thanks for your solution that using 'Set Value' action!
It indeed works and almost a perfect solution for this problem, just still one tiny issue:
As my testing, only if the A field (mentioned by you) is VISIBLE and EDITABLE, we can "Set Value" on it successfully also read its value inside a when condition.
However, actually the A field need not display, after it's set to INVISIBLE ( I set the visibility condition to Never), this solution does not work. Guess it's because "Set Value" can not be used on an invisible field.
A solution is to make the field A only visible at very short time period inside the action set run cycle, controlled by visibility condition.
E.g. set the visibility condition to "not blank". At beginning of the action set, set it to non blank + refresh to make it visible, at end of action set, set it to blank + refresh to make it invisible.
This will let's see a field "flash" quicky in the section.