Declare expression not firing on Repeating Grid (Always editable mode) Pega 7.1.8
My requirement is to implement validation on change functionality of text input of Repeating Grid. The repeating grid I have fetches data from database and displays it on user editable repeating grid. My goal is to execute a declare expression which sums up the values in 3 textinput boxes and populate the resulting value into 4th textinput box. The 4th textinput already has value in it which is being fetched from database. I have to override it with the user input. The problem is that I have declare expression already defined on the resulting column which is not being fired. I have been through couple of posts which suggests that it is not possible to achieve in such cases where we are trying to override it with the value present in database. I will attach screenshots for reference. If anything does not work out, I will have to raise a support request.
Points to consider:
1) I have On Change - Post value defined on all textinput fields.
2) I have Enabled expression calculation on Flow Action.
3) Properties are referring to correct class.
Kindly let me know if you need additional information. Thanks in advance for your help
***Edited by Moderator: Pallavi to update platform capability tags***
Look at the last section in the Change Tracking tab that says "Context Execution Behavior". You've set the declarative rule to only fire if the top level class is of the Applies to class. If you're using this inside a repeating grid, I'm assuming there is a page list property involved behind that and so, the declare expression's class is no longer the top level class. Relax that condition to use "Regardless of any pages that it is contained in". That will fix your issue.
First of all, thank you so much for your suggestion. I made changes you mentioned and it worked fine. The only problem here is that I am fetching all this values from Database. So values which are previously stored in Database might not have summed up values for 3 variables.
In my case, in the database value of "Total Usage for Period" could be equal to (Corridor miles + Other out of Area + In Area) or could not be equal to (Corridor miles + Other out of Area + In Area). So when I fetch values from database into page-list, it should display the original value of "Total Usage for Period" from database. In this case, it overrides it with the correct summed value. Moreover the "Total Usage for Period" field turns into Read-only mode(even if it's setting is not). I want that to be in editable mode so that I can override it.