getFieldValue

Reading Time: 1 minute

Gets the selected value of a field.

Description

vcc.getFieldValue(fieldName: string, [key: string]): FieldValue[] | FieldValue | string | []

Parameters

fieldName
The name of the field.

key
The name of the field.

Return values

Depends on the field type:

  • multiple field: an array of FieldValue objects or an empty array
  • simple field: FieldValue object, the selected value or {String|Number} if key is specified and available or null if there is no selected object or key is unavailable
  • text field: the value of the field as a string

Example

var age = vcc.getFieldValue('age');
var city = vcc.getFieldValue('city');
if (age >= 20 && age <= 30 && !city) {
    return false;
}

There are no comments yet.
Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.

Privacy Settings Center

Necessary

Necessary cookies are essential in order to navigate around a website and use its basic features. You must accept these cookies as the website cannot function properly without them.

__cfduid,debug,PHPSESSID

Marketing

Marketing cookies are used to track visitors across websites and deliver advertisements that are more relevant and engaging to you.

__atuvc,__atuvs,_at.cww,_hjIncludedInSample,_hjRecordingEnabled,ads/user-lists/#,at-lojson-cache-#,at-rand,bt2,di2,_fbp,IDE,lidc,loc,NID,ouid,r/collect,rc::a,rc::b,s,test_cookie,uid,uvc,vc,xtc

Statistics

Statistic cookies collect data to help us understand how visitors use our websites and are used to improve the user experience. These cookies don’t collect personal information and cannot identify visitors.

_ceg.s,_ceg.u,_ga,_gat,_gid,_gat_UA-1696494-11

Other

Other cookies are those cookies that do not fall into the categories above. These cookies are in the process of being classified.

loglevel,socketCluster.authToken,u,webchatClientId,webchatOpen