Discussion
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-07/f7f35052-5e7d-4ed9-ada9-87594f1d3c63.png?itok=bz3Ms_gZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-07/f7f35052-5e7d-4ed9-ada9-87594f1d3c63.png?itok=bz3Ms_gZ)
Pegasystems Inc.
US
Last activity: 24 Feb 2023 15:02 EST
Ask the Expert - App Logic with Chaitra Kamaraju
Join @ChaitraKVL in this month's Ask the Expert as he answers all of your questions on Pega App Logic!
Session dates 6 February - 17 February.
Make sure to Follow and Favorite for updates!
This session will open for questions on 6 February.
Meet Your Expert, Chaitra:
Chaitra has been with Pega for 12 years and in this journey he played a crucial role in building product capabilities for DevOps, architecting utilities to reduce efforts for upgrades, and has been a technical advisor for more than a dozen upgrade projects.
Currently, Chaitra is driving Application Logic capabilities(Activity, Automation, Case Match, Data Transform, Decision Table, Decision Tree, Functions, Validate, When, etc.,.) across the platform.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-07/f7f35052-5e7d-4ed9-ada9-87594f1d3c63.png?itok=bz3Ms_gZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-07/f7f35052-5e7d-4ed9-ada9-87594f1d3c63.png?itok=bz3Ms_gZ)
Pegasystems Inc.
US
Our February Ask the Expert session is now open for your questions!
Ask the Expert Rules
- Follow the Pega Support Center's Rules of Engagement
- This is not a Live Chat - @ChaitraKVL will reply to your questions over the course of the session
- Questions should be clearly and succinctly expressed
- Questions should be of interest to many others in the audience
- Have fun!
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689978000/a7715135-29cc-4aae-bd40-0ae0d499f27d.jpg?itok=dSzkFER7)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689978000/a7715135-29cc-4aae-bd40-0ae0d499f27d.jpg?itok=dSzkFER7)
Pegasystems Inc.
IN
Hello Everyone, I am excited about this session and looking forward to making this a win-win for both of us. I will answer your queries and share the best practices, while I expect you to share feedback and how a capability is helping in your applications. I believe in learning by sharing, and nothing is better when the sharing and learning are happening directly from our partners and customers of the product.
-
Vijay Vaddem Mohammad Ravoof
Updated: 16 Feb 2023 7:09 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
about another question
https://support.pega.com/question/when-condition-under-table-line-click-event-does-not-work-normally
I just would like to know: what's the context of when condition/rule in a table row click event?
e.g. .aaa in below pic. what's the page/context?
I know context of a data transform in a table row click event is the page of the table row where it's clicked.
But seems it's not true for when rule, because it does not work as expected in correct logic
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689978000/a7715135-29cc-4aae-bd40-0ae0d499f27d.jpg?itok=dSzkFER7)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689978000/a7715135-29cc-4aae-bd40-0ae0d499f27d.jpg?itok=dSzkFER7)
Pegasystems Inc.
IN
@MaxonL16591286 , Run Data transform and the When condition of the action takes the row-page as context.
If you want to call a DataTransform as part of Refresh Section action then the DataTransform has to be in the class in which Section is created.
The attached zip has the video recording of the configuration and runtime behavior.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
@ChaitraKVL Hello Chaitra, many thanks for you clarification.
Your answer and demo under Pega 8.8.1 does completely match with my expected behavior, however similar case does not work in Pega version 8.6.6.
First, let's ignore refresh, I do not need refresh section in my case.
Here's my another previous question related to this:
https://support.pega.com/question/when-condition-under-table-line-click-event-does-not-work-normally
Here are some possible reasons I guess. Do you have any idea especially for point 3?
1. Pega version difference.
2. Your demo is running DT, my case is running Script (for file download), Local action (for show a modal dialog)
3. As another earlier answer for this question from Adhilash, "this when rules are evaluated at the time of section render. Meaning they are not evaluated at the time of on Click."
If point 3 is true, then my case will not run because in when rule I depend on a property value in row-page context which was calculated after row click event (before the steps having the when rule)
Also, if point 3 is true, I have another question that, at section render, that is, the section is first shown, which row in the table is used to as the context to the when condition / rule when it is evaluated? At section render, seem Pega can not select a row as context, because no one click on it at all.
Thanks.
@ChaitraKVL Hello Chaitra, many thanks for you clarification.
Your answer and demo under Pega 8.8.1 does completely match with my expected behavior, however similar case does not work in Pega version 8.6.6.
First, let's ignore refresh, I do not need refresh section in my case.
Here's my another previous question related to this:
https://support.pega.com/question/when-condition-under-table-line-click-event-does-not-work-normally
Here are some possible reasons I guess. Do you have any idea especially for point 3?
1. Pega version difference.
2. Your demo is running DT, my case is running Script (for file download), Local action (for show a modal dialog)
3. As another earlier answer for this question from Adhilash, "this when rules are evaluated at the time of section render. Meaning they are not evaluated at the time of on Click."
If point 3 is true, then my case will not run because in when rule I depend on a property value in row-page context which was calculated after row click event (before the steps having the when rule)
Also, if point 3 is true, I have another question that, at section render, that is, the section is first shown, which row in the table is used to as the context to the when condition / rule when it is evaluated? At section render, seem Pega can not select a row as context, because no one click on it at all.
Thanks.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
Hello Chaitra, to verify point 3: As another earlier answer for this question from Adhilash, "this when rules are evaluated at the time of section render. Meaning they are not evaluated at the time of on Click."
Could you do below in your demo:
1. Remove the default value of Locations in all rows. Leave them space.
2. After the "Run DT" button is clicked, you set the event to an action set that include two DT. 1st DT run always to set the Location of current row to a value like "APAC". 2nd DT is just like the current RowSelected with when condition.
After above modification, your demo is more like my case, could you check whether the logic still correct in your demo under this scenario?
Thanks.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
Hello, more findings on this topic:
https://community.pega.com/support/support-articles/local-action-running-all-conditions?
it says below. So it's a Pega defect? At least it should be in version 8.6.6
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689978000/a7715135-29cc-4aae-bd40-0ae0d499f27d.jpg?itok=dSzkFER7)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689978000/a7715135-29cc-4aae-bd40-0ae0d499f27d.jpg?itok=dSzkFER7)
Pegasystems Inc.
IN
@MaxonL16591286 , I found a work-around for this, and it is working for me.
Below is the configuration I made at the row-level in table.
Attached zip has the screen recording of the configuration and runtime behavior.
Updated: 16 Feb 2023 7:09 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Infomatics Corp
US
@MaxonL16591286 This when rules are evaluated at the time of section render. Meaning they are not evaluated at the time of on Click. You need to come up with different approach if you want to disable execution of data transform based on the primary data context and condition.
Updated: 16 Feb 2023 7:09 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
It's quite weird logic seems, that the when condition / rule is evaluated so earlier (section render), instead at time on click.
May I know whether a "refresh section" can also trigger section render, so that the when condition / rule will be re-evaluated?
Updated: 16 Feb 2023 7:09 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
Another thing confused me is, the when condition / rule is run under the context of one page in the table field related data-class page list, right?
If so, at section render, that is, the section is first shown, which page in the page list is used to as the context when the when condition / rule is evaluated?
Updated: 16 Feb 2023 7:09 EST
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@MaxonL16591286 your question is suitable for inclusion in this week's Ask the Expert post.
I will therefore move it under that Discussion to allow more visibility.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
Thanks, expect answers. BTW, the refresh action does not work for this issue as I mentioned just now, thanks.
F.y.i, my Pega version is 8.6.6
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
@MarijeSchillern may I have any update on this? thanks.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689951000/da7084b9-a9c3-461b-afcc-b04a6c62dff4.png?itok=kHpAAuH4)
Pegasystems Inc.
GB
@MaxonL16591286 I thought our SME already responded yesterday?
Please let us know which question is outstanding so that @ChaitraKVL can respond.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IBM
CN
Yes I saw the answer just now, thanks. It's not in time sequence in this page so I miss it yesterday.
I will further ask Chaitra on this topic for some more questions.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-07/f7f35052-5e7d-4ed9-ada9-87594f1d3c63.png?itok=bz3Ms_gZ)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2023-07/f7f35052-5e7d-4ed9-ada9-87594f1d3c63.png?itok=bz3Ms_gZ)
Pegasystems Inc.
US
Thank you to everyone who participated in this month's Ask the Expert session, especially to our expert @ChaitraKVL!
Chaitra, thank you for sharing your expertise in your first session with us! We look forward to future sessions and learning from you!
Keep your eyes on our Ask the Expert homepage for what's coming up in 2023!