Format a numeric field in FeatureTable

1052
4
Jump to solution
11-01-2016 08:36 AM
RobertScheitlin__GISP
MVP Emeritus

I am trying to format a numeric field in a FeatureTable. The help doc says:

<Object>     format      Optional         Use this property to format text, numeric, domain and subtype fields.

But when I use:

              {
                name: 'Available_Size_Sqft',
                alias: 'Available Size',
                format: {
                  "places": 3,
                  "digitSeparator": false
                }
              },

There is no change in the table.

I am using this JS API Sample FeatureTable - Formatting | ArcGIS API for JavaScript 3.18 

And just adding the above code.

MDriscoll-esristaff

0 Kudos
1 Solution

Accepted Solutions
JonathanUihlein
Esri Regular Contributor

Hey Robert, sorry for the delayed response. I checked on this and it looks like this feature *was* slated for the 3.18 release but was removed at the last minute due to some issues with overriding localization defaults. Unfortunately, the doc was not updated to reflect this feature removal. This should be in the 3.19 release. Apologies and thanks. 

View solution in original post

4 Replies
MattDriscoll
Esri Contributor
0 Kudos
SteveCole
Frequent Contributor

Have you tried specifying a formatting function instead of the "inline" method you've shown above?

  ....},
  {
    name: 'pocphone', 
    alias: 'Phone #',
    format: {
      template: "formatPhone"
    }
  },....

function formatPhone(value) {
.
.
.
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I thought I've done this using a featureTable ( I have with plain old dGrid) but I can't track down my own code..

Steve

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Steve,

  I tried a couple of things using a function for the template and nothing worked.

0 Kudos
JonathanUihlein
Esri Regular Contributor

Hey Robert, sorry for the delayed response. I checked on this and it looks like this feature *was* slated for the 3.18 release but was removed at the last minute due to some issues with overriding localization defaults. Unfortunately, the doc was not updated to reflect this feature removal. This should be in the 3.19 release. Apologies and thanks.