Discussion
Wipro technologies GmbH
DE
Last activity: 4 Oct 2018 11:08 EDT
Conditional configuration of OnClick events
Hi,
Can we configure the onclick events conditionally?
Suppose on a button click I have two events
1.Call an Activity
2. Refresh setion
But there is some condition in the Activity, if that satisfies then only the Refresh section event should occur.
How can we implement this?
Thanks,
Aasif
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hello Aasif,
When you define more than one event for a control please remember that the actions are executed from the top down and all processing effects of an action in the list will complete before the next action. Depending on what you need to do you may apply conditions using the Display:Apply conditions action that evaluates conditions on the client; or you may use the visible when rule on the section properties to not make a section visible based on certain conditions.
Lu
Wipro technologies GmbH
DE
Hi Lu,
Thanks for your reply!
Actually there are two things:
1. For a single event like OnClick I want to configure multiple actions.
2 While selecting Apply Conditions from action list, there is no parameter or field to enter. I am not sure which condition system will evaluate in order to execute the next action.
Please explain.
Thanks
Pegasystems Inc.
US
Hello,
1. You should be able to do this when you click on the cell properties and go to Actions tab, then Add an event and you will have options to add one or more actions, further you are able to make the actions conditional--see screenshot below.
Please provide additional clarification on your point number two if needed-context is not clear
Lu
CSAA
US
Hi
I tried to use the above Display:Apply Conditions in my action set for conditionally displaying a harness.After Including the action, it is showing "No Parameters".Please Help me with this.
Pegasystems Inc.
US
Yes, that particular action I used as an example does not have parameters and is simply applying a conditional display. But please investigate the many other options available. For another example there is a Display Refresh section option is not only conditional but has parameters to allow you to apply a transform rule or an activity to display information on the clipboard. See below:
Tech Mahindra
CA
Hi Leo,
This when conditions are not available buttons(probably all the 7.*) any reason why ?? ( See Attachments)
but available for Text Boxes, but when i am seeing runtime code, i don't see the when condition, how it will get fired ??
Hi Leo,
This when conditions are not available buttons(probably all the 7.*) any reason why ?? ( See Attachments)
but available for Text Boxes, but when i am seeing runtime code, i don't see the when condition, how it will get fired ??
<script type="text/javascript" src="webwb/pzpega_control_textinput_12469617486.js!!.js"></script><span nowrap> <input data-test-id='2017051208091108825460' data-ctl='["TextInput"]' id="pyTemplateInputBox" type='text' value="" name="$PpyTempWorkPage$ppyTemplateInputBox" class="leftJustifyStyle" data-change='[["runScript", ["window.open()"]]]' ></span></div></div></div></div></div></div></div>
Our requirement : To launch a different application using window.open once the page is validated using obj-validate (in flow action) if there are no messages.
any thoughts ??
C3i, Inc.
US
Can't see the option to make the Actions conditional. I'm using Pega 7.1.7 with CPM 7.1.3
Attached is the screenshot.
Tech Mahindra
CA
Gaurav, when condition options are not available for buttons, How did you solution ed this ?
Pegasystems Inc.
US
Hi Naveen,
I just wanted to point out your question is in reply to a thread last active in 2015. It's possible you'll get a reply, but to increase your chances I'd recommend creating a new post detailing the issue you are trying to troubleshoot.
Thanks.
B.
Services Australia
AU
Hi Asif,
To implement conditional based actions on button click, you need to have two buttons with visible when conditions set. Visible when condition should be based on "some condtion" from activity and for each button specify what actions needs to be performed seperately. For first button, set only "Excute activity" and for second button, Set both, "execute" and "refresh", visible when condition should display only one of these buttons.
Vamshi
Wipro Technologies
IN
Hi All,
I running through a similar issue where events are fired even though there are validation errors like missing required fields on the forms. Not all events have When conditions. In case if i want to do a "Run a script" it doesn't have a when condition. i want to stop that event conditionally. how can i achieve it?
Tata Consultency Services
US
Same problem for me also. It's not displaying any conditions.
TCS
US
Conditions — Restrictions, such as When rules, that can be applied to an event and action combination. For example, you can configure conditions so that hovering over a field displays ShowInfo only if the field contains a property value.
Using when conditions, you can combine behaviors for a single control. For example, a first behavior states that when the user focuses on the Input Area, the system sets the background color to red (defined in the Inline Style field) if the area is populated.
Conditions — Restrictions, such as When rules, that can be applied to an event and action combination. For example, you can configure conditions so that hovering over a field displays ShowInfo only if the field contains a property value.
Using when conditions, you can combine behaviors for a single control. For example, a first behavior states that when the user focuses on the Input Area, the system sets the background color to red (defined in the Inline Style field) if the area is populated. A second behavior states that, for the same event, the system sets the background color to blue if the area is empty.
Buttons do not use behavior conditions. Use the Disabled or Privilege fields in the Options area to determine whether the button is available to specific users. You cannot use conditions with Action
control types — use the Disabled,
Privilege
, or both settings in the Optionsarea.
Wipro Ltd
IN
HI All,
I''ve similar requirement ,please assist.
scenario;
I've user work list which contains different type of cases.I want to open some cases in perform mode and and some in review mode
Tried with:
PEGA providing these 2 funcationalities independently using actions"open selected item and open work by handle' but i want to club these functinalities conditionally.
in actions "Apply conditions' did n't help me.
i've written a actity ,in this activity i am calling work-.Open for display case in review mode and Assign-.processAssigment for perform mode display.
activity is excecuting perfectly but harness is not dispalying.after browser refresh it is showing the harness review/perform.
any other alternative , please suggest
Pegasystems Inc.
PL
Hi !
I have similar problem, our scenario:
- Button "Save" with onClick custom activity pzSave
- I want to refresh other section conditionally depending on pzSave activity status
Please help.
IN
Even i have same issue can some one suggest how to achieve conditional refresh on click of button
TATA Consultancy Services
IN
Pegasystems Inc.
IN
Hello!
I noticed that the original post is from 2015 and the last activity was a few months ago. We recommend that you create a new post with your use case and replication scenario so that you get more up-to-date and quick responses.
Regards,