Default value of property not displayed when Read-only, upgrade
After an upgrade from PRPC 5.4 to Pega 7.1.8, users report that the default value of a property is ignored when the Read-Only condition is set.
According to SA-10152 (Default value of a property is not displayed when Read-only), this issue was fixed in Pega 7.1.7. However, the case reported for this article appears to contradict that information.
Steps to Reproduce
Perform the local-change provided in SA-10152, Default value of a property is not displayed when Read-Only.
PRPC ignores the Disable When condition; therefore, the default value is not displayed.
A defect or configuration issue in the operating environment
Here’s the explanation for the reported behavior:
Between PRPC 6.1 and Pega 7.1, product functionality changed to correct a defect that existed in PRPC 6.1, namely, the Read-Only field should never have had the 'Default value' in the first place.
The 'Default value' setting is applicable only when the field is rendered in editable mode. This is expected because a read-only field with a default value would never be submitted to the server (it being read-only). Hence, it is not correct to show 'Default value' for a Read-Only case.
It all relies on the availability of the Required option. The option is not tied to the control being 'Text input' versus 'Default'. It is actually tied to whether the Edit option is "Read-only (always)". If this is the edit option setting, the Required option does not appear. The documentation indicates as much:
This box appears only for fields in cells on flow actions and sections. Select to require that (when the form appears at runtime in read-write mode) users cannot successfully submit the form if the field is blank.
Selecting Required marks the label for this field with an orange asterisk () when the flow action form appears in read-write mode. (The asterisk also appears if the Label control's Value For field is not blank and the Label control's Required box is checked.)
For sections, checking this box enables client-side format validation when this section is part of a harness form that has the Enable Client Side Validation box selected on the HTML tab. At runtime, users who leave this field blank and submit the form are notified immediately that the field is required; the form is not transmitted to the server.
In Pega 7.1.7 the behavior is that the appearance of the Required option is strictly dependent on whether "Read-only (always)" is set as the Edit option on the presentation tab of the cell properties.
If you wish to set a value on a property on load, it depends on where you are using it. If you are designing a flow action as part of a flow, then in the flow action rule on the Action tab, there is a Pre-processing section at the top. It has fields where you can specify a data transform to apply or an activity to run. You can use either of these to set the default value for the property. They will both run before the flow action loads.
0% found this useful