Dynamically Populate a Field Based-on the Value(s) of Another Field

appstorm
Tera Contributor

I have been working on several on-change client scripts to make this work, but have so far been unsuccessful.  The task to make two fields that share the same table populate with their respective values, based-on the value of another field from the same table.

find_real_file.png

find_real_file.png

Below, is my script include.

find_real_file.png

 

How do I go about writing an on-change CS to make this work?

Thank you!

1 ACCEPTED SOLUTION

-O-
Kilo Patron
Kilo Patron

This is what I have defined in my PDI:

Hfind_real_file.pngHave added the fields to the Change Request form:

find_real_file.png

After flushing the cache, when I change System, Analyst and Owner automatically update.

View solution in original post

38 REPLIES 38

-O-
Kilo Patron
Kilo Patron

This is what I have defined in my PDI:

Hfind_real_file.pngHave added the fields to the Change Request form:

find_real_file.png

After flushing the cache, when I change System, Analyst and Owner automatically update.

appstorm
Tera Contributor

IT WORKS!!!

I had to change the system field from a reference to a drop-down, but it FINALLY works!

Thanks so much!!!

You're most welcome and I'm glad it's working 🙂

appstorm
Tera Contributor

Quick question: Why was this not working when system was a reference field referencing u_change_request_system_owner table, but works when it is a choice list?  Just curious, since it would be easier to reference the table column data, instead of having to maintain a drop-down.

Thanks again!

I cannot say for sure without knowing all the definitions of all the fields involved, but the bottom line is that values must match on a value level, not on a display value level. If you could provide me the definition of the field on the table, I could tell you exactly why it is working the way it is configured now.