SAS Risk Dimensions, SAS High Performance Risk, SAS Enterprise GRC and other banking and insurance solutions

How to know whether any of the field value is changed in a scree definition file

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

How to know whether any of the field value is changed in a scree definition file

Hi,
Is there any system field which tells when any of
the field value is changed before saving the object. Or
Is there any way to capture this changes?

Accepted Solutions
Solution
‎03-10-2016 02:12 PM
SAS Moderator
Posts: 13

Re: How to know whether any of the field value is changed in a scree definition file

Yes, you can use the <on-change> XML element within the field to determine if the value is changed before the object is changed. If it is changed, you can perform an action. Here is an example from the Administration and Customization Guide. 

 

<field name="x_option1" type="dropdown" values="getNamedListLabelValues('MyNamedList')">
  <label>Married</label>
  <on-change>
    <set-visible name="x_str1" test="x_option1 = 'Y'"/>
  </on-change>
</field>
  <field name="x_str1" type="string">
  <label>Name of Spouse</label>
</field>

In this example, if a person were to select the option 'Y' from a drop-down on the 'Married' field, <on-change> recognizes the update to the field, tests to see if the selection is Y, and makes the 'Name of Spouse' field visible in the user interface if the selected field meets that criteria.


Does this answer your question?

View solution in original post


All Replies
Solution
‎03-10-2016 02:12 PM
SAS Moderator
Posts: 13

Re: How to know whether any of the field value is changed in a scree definition file

Yes, you can use the <on-change> XML element within the field to determine if the value is changed before the object is changed. If it is changed, you can perform an action. Here is an example from the Administration and Customization Guide. 

 

<field name="x_option1" type="dropdown" values="getNamedListLabelValues('MyNamedList')">
  <label>Married</label>
  <on-change>
    <set-visible name="x_str1" test="x_option1 = 'Y'"/>
  </on-change>
</field>
  <field name="x_str1" type="string">
  <label>Name of Spouse</label>
</field>

In this example, if a person were to select the option 'Y' from a drop-down on the 'Married' field, <on-change> recognizes the update to the field, tests to see if the selection is Y, and makes the 'Name of Spouse' field visible in the user interface if the selected field meets that criteria.


Does this answer your question?

New Contributor
Posts: 3

Re: How to know whether any of the field value is changed in a scree definition file

Hi Bwil,

Thanks for your reply. This option I know. I have too many fields in the screen, linking other objects and dimensions. So if we go with on change element, it would be more complicated. So, is there any other option? .
Thanks for your your valuable time.
SAS Moderator
Posts: 13

Re: How to know whether any of the field value is changed in a scree definition file

Unfortunately on-change is the only way I know to dynamically change fields on the screen.

Post a Question
Discussion Stats
  • 3 replies
  • 439 views
  • 0 likes
  • 2 in conversation