getting started with g_form functions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2009 06:07 AM
The following client-side script works fine on the incident table (monitoring a Short Description change):
function onChange(control, oldValue, newValue, isLoading) {
if (oldValue == newValue) {return;}
var desc = g_form.getValue('Short_description');
return alert('Short Desc Changed: ' + desc);
}
But when I try the exact same logic and structure on a new table I created,
I don't get any values using the g_form.getValue ….
Is there something that I have to do to initialize a table for use with the g_form functions?
The Wiki appears silent on this … lots of references on the g_form functions, but none of them
Seem to work on a new table …. Help please.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2009 09:45 AM
You need to use the all lower-case element name for this to work like it should. You can get the correct element name for each field by right-clicking on the field label and selecting 'Personalize dictionary'. You're looking at something different.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2009 09:50 AM
gotcha ... thanks - new there was something I was missing (see my note about the dropdown)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2009 09:48 AM
Ahhhhhh .... all user defined fields (whether added to an existing table or created in a new table) begin with "u_" .... I added that to the field name and viola .... it works.
The field drop down (that appears when you are creating an on change script) doesn't show the u_ preface, either - which is what threw me
Bob