Posted: 26 Jul 2018 13:40 EDT Last activity: 1 Aug 2018 6:54 EDT
Change in number of drop down values. What happens to populated Prior Values?
I have a dropdown list of values which is populated by a datapage (for example) 1234567 where a user can select any of the seven values.
Our new requirement says that this dropdown list of values is having only values 12345 i.e two values have been eliminated.
There are some cases in PROD where users have selected values 6 or 7 and when they open the case, instead of displaying 6 or 7, the very first value in the list i.e. '1' is being displayed because PEGA is unable to find the value 6 or 7.
Is there a way to preserve the OLD values and let the case progress instead of PEGA preselecting 1 as it is unable to find the previous values?
Just to clarify my request - here is the scenario.
I have a dropdown list of fifty USA states and due to business changes/policies I am having only 40 USA states. When I open a WO in PROD that was created for the state that is NOW not present in the drop down list, PEGA is picking up the very first state.
I am displaying the states using a ‘Dropdown’ control in a section which is sourced by a datapage which holds all the 40 states. PEGA is looking for that nonexistent state and not finding that on the Datapage, it is overwriting that existing value in the WO with the very first value from the Datapage.
Can you please explain HOW we would show the value on another field? How would we show the previous value if it is not available on the datapage in the first place?
Pega is looking for a match between the pagelist on the datapage and page list on my WO. Because it is unable to find the match AND since the length of my WO pagelist is not zero, PEGA is picking the first value on the datapage.
My WO has a property of CustomerState as WY as below
D_StatesValueList_pa1220938411928386pz.pxResults(1) to D_StatesValueList_pa1220938411928386pz.pxResults(40) does NOT have WY.
When my WO is opened for review, PEGA is unable to find WY in the 40 pxResults() list and is picking up D_StatesValueList_pa1220938411928386pz.pxResults(1) and over writing current property CustomerState WY with D_StatesValueList_pa1220938411928386pz.pxResults(1).
This states value is being displayed in a DropDown control.
Customer WANTS the previous value to be on the WO. Is there a way to accomplish this?
Make sure that "pyWorkPage.InsuranceType.Customers.CustomerList(1).CustomerState" cannot be modified directly from the UI. The property can be still shown as read-only, but it may not be modified directly.
Introduce a temporary property "uiCustomerState" that is a drop down control, populated from your data page. On creating the WorkObject, that control is visible, changing the selection will update "pyWorkPage.InsuranceType.Customers.CustomerList(1).CustomerState", and on storing the WO "uiCustomerState" is removed.
When modifying an existing WO, the drop down control will get only visible when the current value of "pyWorkPage.InsuranceType.Customers.CustomerList(1).CustomerState" does exist on the data page that is the source for the drop down list. As the selection on that control will not change when it is invisible, "pyWorkPage.InsuranceType.Customers.CustomerList(1).CustomerState" will not be updated.
If "pyWorkPage.InsuranceType.Customers.CustomerList(1).CustomerState" should be modifiable even it has currently an "invalid" or "unknown" value, introduce a button that makes the drop down control visible; now a change to the selection will update "pyWorkPage.InsuranceType.Customers.CustomerList(1).CustomerState".
Since the dropdown control is intended to edit the value but only allow valid selection this is working as expected.
One way that you could configure this is to set the edit mode to read only when the property value does not exist in the Data Page (i.e. it is an old value), and use the Read-only value settings set to "Property Value"
For example below I have set the dropdown to be read only, if the value of the property (pyTempText) does not appear in my Datapage (D_CakeList, propery CakeType). If the user opens a case where the value does not appear in the data page then it will display as read only with the "old" value instead of displaying the editable dropdown.
If you still need to be able to edit the old value then you could configure some kid of edit icon to switch back to the editable mode. In this example I use an icon to call a data transform that sets the value of pyTempText to "" (hence the condition B in the when rule above), and refresh the section. The icon can use the same when rule as a visible when condition.
Below is an example where I remove the "Chocolate" value from the dropdown source. When I reopen the case it displays as read only with a note that this is an old value. When i click the icon a data transform sets the property to "" and the dropdown becomes editable based on the edit condition.