- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2020 12:25 PM
I am configuring a client script and trying to get the value that is set in the field "source_table" which is Type: Table Name. I was looking for more information on the variable Type: Table Name, but nothing stood out to me. Can anyone help point me in the right direction so that my 'getValue' pulls the data? Thanks in advance!
function onLoad() {
var abc = g_form.getValue('source_table');
if (abc == 'change_request'){
g_form.removeOption(‘state’,‘information’);
}
}
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2020 12:11 PM
If you don't have that field on form then you will not be able to get value of it in client script.
Make sure source table field is on form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2020 01:04 PM
Hi Michelle,
I wrote a simple client script to try and find your issue:
function onLoad() {
//Type appropriate comment here, and begin script below
var theValue = g_form.getValue("source_table");
if (theValue == "change_request") {
g_form.addInfoMessage("Value is " + theValue + " this is the true path");
}
else {
g_form.addInfoMessage("Value is " + theValue + " this is the FALSE path");
}
}
When I run it I always get the if message rather than the else meaning that it is getting change_request as the source_table. I'd suggest that you make sure that you have the removeOption() arguments correct. There is no OOTB information option for state in sysapproval_approver.
Hope that helps.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2020 03:39 PM
Hi
when I run it gives me the Else statement "Value is this is the FALSE path"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2020 05:08 AM
Hi Michelle,
I suspected that you had created the option. When you run the script that shows the FALSE path, what is it showing for the table name?
:{)
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2020 11:42 AM