- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2022 11:12 AM
Hello SN community,
I'm trying to write an onChange client script based on a dot walked field (Operating System) on my form but the field does not appear in the list of selectable fields. The requirement is to have the field auto-populated based on what is in the parent record of the form so I have a script include for that. Can this be done in a client script? If yes, can someone please tell me how to get the field to show up. What I am seeing is below:
Form Field: Operating System(OS)
Missing as an option in Client Script:
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2022 11:42 AM
Hello,
You can access the dot-walked field within a UI Policy and then use the script section to then set a particular value for another field. In the condition builder, you can scroll to the bottom of the field selections and choose "Show related fields", then scroll back up to your initial field and then choose the dot-walk applicable entry indicated by => '... fields' verbiage.
From there, in the script section, you can set what would happen if true and/or false (such as calling GlideAjax, etc. it's a client scriptable field).
Additionally, if you don't want it to execute onLoad, you can uncheck the "On load" checkbox to not have it execute on load (it'll still execute on change).
Takes a bit of setup, but it can be done.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2022 11:14 AM
You can't create onChange script for dot walked fields
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2022 11:28 AM
That explains it then ... thank you Aman!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2022 11:42 AM
Hello,
You can access the dot-walked field within a UI Policy and then use the script section to then set a particular value for another field. In the condition builder, you can scroll to the bottom of the field selections and choose "Show related fields", then scroll back up to your initial field and then choose the dot-walk applicable entry indicated by => '... fields' verbiage.
From there, in the script section, you can set what would happen if true and/or false (such as calling GlideAjax, etc. it's a client scriptable field).
Additionally, if you don't want it to execute onLoad, you can uncheck the "On load" checkbox to not have it execute on load (it'll still execute on change).
Takes a bit of setup, but it can be done.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 10:18 PM - edited 11-30-2023 10:56 PM
The other option is to create the client script for another field and then list edit the client script to point to the dotwalked field instead. It works, but its messy. The other option, to make it a bit cleaner, is to add the attribute "allow_references=true" to the sys_script_client.field dictionary entry. This lets you select dotwalked fields on client scripts. Which, from my limited testing, do seem to work. I have also found there are two OOTB fields in the HR app that use dotwalked references.