Changing label value from number to text.

616
1
Jump to solution
09-06-2018 05:44 AM
SivaramKrishnan2
New Contributor III

Hi

I'm creating a feature layer dynamically from a query result from the web service in WAB 2.6

I'm trying to set the label in the output feature layer using the following snippet.

and i'm getting the following result.

I need to consolidate the number values present in the label to some currency representation instead of plain numbers.

kindly help me to resolve this.

Thanks & Regards

Siva

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Siva,

   This should work:

        var json = {
          "labelExpressionInfo": {"value": "${" + this.secValueName + "}"},
          "fieldInfos": [{fieldName: this.secValueName, format: { "digitSeparator": true}}]
        };‍‍‍‍

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Siva,

   This should work:

        var json = {
          "labelExpressionInfo": {"value": "${" + this.secValueName + "}"},
          "fieldInfos": [{fieldName: this.secValueName, format: { "digitSeparator": true}}]
        };‍‍‍‍