- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 10:01 AM
Hello All.
Please could anyone help me with the question how to get the value of the Catalog Item variables displayed on the Catalog Task forms "Variables" section. In my example image the Catalog Task form "Variables" contain four variables. I need to retrieve value of the "Test number" variable and compare it with some values in my code and show the message to the user.
To keep the question simple - how to retrieve value of the catalog item variable displayed on the Catalog Task form's "Variables" section. Thank you in advance, any help very much appreciated.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 10:06 AM
Are you trying to get the values in a Client Script, or are you trying to get the in a workflow / Server-Side script?
If client side, the standard g_form.getValue('<fieldname>'); should return the value.
If in a workflow / server-side you would want to use current.variables.<fieldname> to return the current value.
Otherwise if you can describe your use-case, we can provide more detailed options.
If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 10:06 AM
Are you trying to get the values in a Client Script, or are you trying to get the in a workflow / Server-Side script?
If client side, the standard g_form.getValue('<fieldname>'); should return the value.
If in a workflow / server-side you would want to use current.variables.<fieldname> to return the current value.
Otherwise if you can describe your use-case, we can provide more detailed options.
If this was helpful or correct, please be kind and remember to click appropriately! Michael Jones - Proud member of the CloudPires team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 01:57 PM
Thank you, Michael.
I tried g_form.getValue('<fieldname>'); , but it didn't work in my Client Script. However, your answer forced 🙂 me to look into it more carefully. My Catalog Item variables were created in Variable set. I moved out from the variable set the filed I needed and set as a single variable and da-ta 🙂 my code returned the value of the variable. Thanks a million.