Help with dot walked field in Client Script

Still Learning
Kilo Sage

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)

     find_real_file.png find_real_file.png 

Missing as an option in Client Script:

find_real_file.png

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

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!

View solution in original post

6 REPLIES 6

Thanks for this @James Fricker . I have a dotwalked list collector field that needs to fire a logic each time the list changes and UI policy for list collector doesnt have the condition for that. This solution works perfect for my use case.

Mate Levai
Tera Contributor

You can actually do that!

  1. Create an onChange Client script with any other field
  2. Open the Client script list view, filter on that client script
  3. Add column “Field name”
  4. Replace the Field name value with the dot walk field like: “table.field_name”

Note: dot walked field needs to be on the form