Cannot get value from a different field(variable) in catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2025 11:54 AM - edited 03-15-2025 12:29 PM
I have a Catalog Client Script that is using a reference field for it's selected Variable name. I have it set for it to use GlideAjax to receive the price of record from the reference. I have another variable called 'Quantity' that I want to use to retrieve the value for. However, using the getValue() method I cannot seem to retrieve the value at all. I've tried other methods such as:
g_form.getValue('quantity');
g_form.getIntValue('quantity');
g_form.getDisplayValue('quantity');
g_form.getDisplayBox('quantity');
g_form.getDisplayBox('quantity').value;
g_form.getDisplayBox('quantity').toString();
I've tried them with and without Number() and parseInt() but it does not work! How to fix this?
For reference, here's the full script currently: