Set values of Spinner fields with Javascript
search cancel

Set values of Spinner fields with Javascript

book

Article ID: 43712

calendar_today

Updated On:

Products

CA Service Catalog

Issue/Introduction

Spinner fields on forms are a helpful way to set numeric values in a service offering. However, you may wish to set defaults dynamically, based on other selections.

Is it possible to set a spinner field dynamic, the same way you set a text field for example (ca_fdSetTextFieldValue(formId, _id, value))?

Environment

Release: CASVCT99000-12.9-Service Catalog
Component:

Resolution

Text fields have the following specific Javascript methods over and above the General ones:

ca_fdGetTextFieldValue(formId, _id)

Returns the current value of the text field.

ca_fdSetTextFieldValue(formId, _id, value)

Sets text of text field.

However, they they are not just to be used for fields in the “Text Field” – they also apply for text areas, lookup, label, slider and spinner fields, in just the same way.

Additional Information

A full list of out-of-the-box Javascript methods for form scripting are available in the Catalog server’s help section, at

http://<hostname>:<port>/usm/API/JS/symbols/_global_.html