Changing Data Types within the CMV Map ServiceConfigurable Map Viewer (CMV) - Content Pane with...

Why must Chinese maps be obfuscated?

Was there a shared-world project before "Thieves World"?

How to have a sharp product image?

Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?

Why do type traits not work with types in namespace scope?

Why does nature favour the Laplacian?

Lock file naming pattern

If a planet has 3 moons, is it possible to have triple Full/New Moons at once?

Can we say “you can pay when the order gets ready”?

How come there are so many candidates for the 2020 Democratic party presidential nomination?

Why was primality test thought to be NP?

Refer to page numbers where table is referenced

What makes accurate emulation of old systems a difficult task?

Map of water taps to fill bottles

Binary Numbers Magic Trick

What term is being referred to with "reflected-sound-of-underground-spirits"?

How to pronounce 'c++' in Spanish

Is it idiomatic to construct against `this`?

Mjolnir's timeline from Thor's perspective

Symbolic Multivariate Distribution

What does a straight horizontal line above a few notes, after a changed tempo mean?

How does a program know if stdout is connected to a terminal or a pipe?

Question about かな and だろう

Does Gita support doctrine of eternal cycle of birth and death for evil people?



Changing Data Types within the CMV Map Service


Configurable Map Viewer (CMV) - Content Pane with CMVConfigurable Map Viewer (CMV) - Print Widget - Proxy IssueConfigurable Map Viewer (CMV) - Open Help on page loadConfigurable Map Viewer (CMV) - average the values of the pointsHow to add customization to Configurable Map Viewer (CMV)?Configurable map viewer (CMV) - Find the area of drawn polygonCMV Secure Feature Service - ProxyArcGIS Javascript API using CMV - Tiled Map Service PopupConfigurable Map Viewer (CMV) Measurement Widget Error






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Is it possible to format fields that appear in tables within the map service?



In the table results after a spatial query, date fields are converted to UTC rather than duplicating the values from the original data (e.g., original data is "1/2/2017"; the table in the CMV shows "1/1/2017 6:00 p.m."). Export.js was modified with a Date() function so the exported file has the correct date. Also, a field that is a multi-digit integer value is appearing as a floating point with decimal places and commas (e.g., value: 123456, table field: 123,456.000). This value is a code and isn't a decimal value.










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What table widget(s) are you using?

    – twoLeftFeet
    Jan 20 '17 at 1:09













  • Tables are defined in the jsgisdijitFind.js code. There is also an AttributesTable widget that doesn't have documentation.

    – user90009
    Jan 20 '17 at 23:56


















0















Is it possible to format fields that appear in tables within the map service?



In the table results after a spatial query, date fields are converted to UTC rather than duplicating the values from the original data (e.g., original data is "1/2/2017"; the table in the CMV shows "1/1/2017 6:00 p.m."). Export.js was modified with a Date() function so the exported file has the correct date. Also, a field that is a multi-digit integer value is appearing as a floating point with decimal places and commas (e.g., value: 123456, table field: 123,456.000). This value is a code and isn't a decimal value.










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • What table widget(s) are you using?

    – twoLeftFeet
    Jan 20 '17 at 1:09













  • Tables are defined in the jsgisdijitFind.js code. There is also an AttributesTable widget that doesn't have documentation.

    – user90009
    Jan 20 '17 at 23:56














0












0








0








Is it possible to format fields that appear in tables within the map service?



In the table results after a spatial query, date fields are converted to UTC rather than duplicating the values from the original data (e.g., original data is "1/2/2017"; the table in the CMV shows "1/1/2017 6:00 p.m."). Export.js was modified with a Date() function so the exported file has the correct date. Also, a field that is a multi-digit integer value is appearing as a floating point with decimal places and commas (e.g., value: 123456, table field: 123,456.000). This value is a code and isn't a decimal value.










share|improve this question
















Is it possible to format fields that appear in tables within the map service?



In the table results after a spatial query, date fields are converted to UTC rather than duplicating the values from the original data (e.g., original data is "1/2/2017"; the table in the CMV shows "1/1/2017 6:00 p.m."). Export.js was modified with a Date() function so the exported file has the correct date. Also, a field that is a multi-digit integer value is appearing as a floating point with decimal places and commas (e.g., value: 123456, table field: 123,456.000). This value is a code and isn't a decimal value.







arcgis-javascript-api configurable-map-viewer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 20 '17 at 2:43









twoLeftFeet

354110




354110










asked Jan 19 '17 at 23:48









user90009user90009

162




162





bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • What table widget(s) are you using?

    – twoLeftFeet
    Jan 20 '17 at 1:09













  • Tables are defined in the jsgisdijitFind.js code. There is also an AttributesTable widget that doesn't have documentation.

    – user90009
    Jan 20 '17 at 23:56



















  • What table widget(s) are you using?

    – twoLeftFeet
    Jan 20 '17 at 1:09













  • Tables are defined in the jsgisdijitFind.js code. There is also an AttributesTable widget that doesn't have documentation.

    – user90009
    Jan 20 '17 at 23:56

















What table widget(s) are you using?

– twoLeftFeet
Jan 20 '17 at 1:09







What table widget(s) are you using?

– twoLeftFeet
Jan 20 '17 at 1:09















Tables are defined in the jsgisdijitFind.js code. There is also an AttributesTable widget that doesn't have documentation.

– user90009
Jan 20 '17 at 23:56





Tables are defined in the jsgisdijitFind.js code. There is also an AttributesTable widget that doesn't have documentation.

– user90009
Jan 20 '17 at 23:56










1 Answer
1






active

oldest

votes


















0














This is two separate questions it seems.



formatting the attributes table



You can pass a gridOptions object in the tables object that can format columns fairly easily. See this link for details on how this looks in context.



gridOptions: {
columns: [{
field: 'incidentnm',
label: 'Name'
},{
field: 'inspdate',
label: 'Inspected',
width: 150,
get: function (object) { // allow export as a proper date
return getDateTime(object.inspdate);
},
formatter: formatDateTime
},


In the example, formatDateTime is a function that would format your date. FYI, the attributes table and other widgets have extensive documentation in their relevent repo: https://github.com/tmcgee/cmv-widgets#attributes-tables



formatting the find widgets table.



This isn't as easy, since the widget hasn't received a lot of attention now that most people are using the Search widget that tmcgee has in the same repo. But its still possible if you modify the widget when the grid is created.



Somewhere around these lines you would have to do this:



this.resultsGrid = new Grid({
selectionMode: this.selectionMode,
cellNavigation: false,
showHeader: true,
store: this.resultsStore,
columns: [{
label: 'First Name',
field: 'first'
},
{
label: 'Last Name',
field: 'last'
},
{
label: 'Age',
field: 'age',
get: function(object){
return (new Date() - object.birthDate) / 31536000000;
}
}]
}, this.findResultsGrid);





share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "79"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f225186%2fchanging-data-types-within-the-cmv-map-service%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This is two separate questions it seems.



    formatting the attributes table



    You can pass a gridOptions object in the tables object that can format columns fairly easily. See this link for details on how this looks in context.



    gridOptions: {
    columns: [{
    field: 'incidentnm',
    label: 'Name'
    },{
    field: 'inspdate',
    label: 'Inspected',
    width: 150,
    get: function (object) { // allow export as a proper date
    return getDateTime(object.inspdate);
    },
    formatter: formatDateTime
    },


    In the example, formatDateTime is a function that would format your date. FYI, the attributes table and other widgets have extensive documentation in their relevent repo: https://github.com/tmcgee/cmv-widgets#attributes-tables



    formatting the find widgets table.



    This isn't as easy, since the widget hasn't received a lot of attention now that most people are using the Search widget that tmcgee has in the same repo. But its still possible if you modify the widget when the grid is created.



    Somewhere around these lines you would have to do this:



    this.resultsGrid = new Grid({
    selectionMode: this.selectionMode,
    cellNavigation: false,
    showHeader: true,
    store: this.resultsStore,
    columns: [{
    label: 'First Name',
    field: 'first'
    },
    {
    label: 'Last Name',
    field: 'last'
    },
    {
    label: 'Age',
    field: 'age',
    get: function(object){
    return (new Date() - object.birthDate) / 31536000000;
    }
    }]
    }, this.findResultsGrid);





    share|improve this answer




























      0














      This is two separate questions it seems.



      formatting the attributes table



      You can pass a gridOptions object in the tables object that can format columns fairly easily. See this link for details on how this looks in context.



      gridOptions: {
      columns: [{
      field: 'incidentnm',
      label: 'Name'
      },{
      field: 'inspdate',
      label: 'Inspected',
      width: 150,
      get: function (object) { // allow export as a proper date
      return getDateTime(object.inspdate);
      },
      formatter: formatDateTime
      },


      In the example, formatDateTime is a function that would format your date. FYI, the attributes table and other widgets have extensive documentation in their relevent repo: https://github.com/tmcgee/cmv-widgets#attributes-tables



      formatting the find widgets table.



      This isn't as easy, since the widget hasn't received a lot of attention now that most people are using the Search widget that tmcgee has in the same repo. But its still possible if you modify the widget when the grid is created.



      Somewhere around these lines you would have to do this:



      this.resultsGrid = new Grid({
      selectionMode: this.selectionMode,
      cellNavigation: false,
      showHeader: true,
      store: this.resultsStore,
      columns: [{
      label: 'First Name',
      field: 'first'
      },
      {
      label: 'Last Name',
      field: 'last'
      },
      {
      label: 'Age',
      field: 'age',
      get: function(object){
      return (new Date() - object.birthDate) / 31536000000;
      }
      }]
      }, this.findResultsGrid);





      share|improve this answer


























        0












        0








        0







        This is two separate questions it seems.



        formatting the attributes table



        You can pass a gridOptions object in the tables object that can format columns fairly easily. See this link for details on how this looks in context.



        gridOptions: {
        columns: [{
        field: 'incidentnm',
        label: 'Name'
        },{
        field: 'inspdate',
        label: 'Inspected',
        width: 150,
        get: function (object) { // allow export as a proper date
        return getDateTime(object.inspdate);
        },
        formatter: formatDateTime
        },


        In the example, formatDateTime is a function that would format your date. FYI, the attributes table and other widgets have extensive documentation in their relevent repo: https://github.com/tmcgee/cmv-widgets#attributes-tables



        formatting the find widgets table.



        This isn't as easy, since the widget hasn't received a lot of attention now that most people are using the Search widget that tmcgee has in the same repo. But its still possible if you modify the widget when the grid is created.



        Somewhere around these lines you would have to do this:



        this.resultsGrid = new Grid({
        selectionMode: this.selectionMode,
        cellNavigation: false,
        showHeader: true,
        store: this.resultsStore,
        columns: [{
        label: 'First Name',
        field: 'first'
        },
        {
        label: 'Last Name',
        field: 'last'
        },
        {
        label: 'Age',
        field: 'age',
        get: function(object){
        return (new Date() - object.birthDate) / 31536000000;
        }
        }]
        }, this.findResultsGrid);





        share|improve this answer













        This is two separate questions it seems.



        formatting the attributes table



        You can pass a gridOptions object in the tables object that can format columns fairly easily. See this link for details on how this looks in context.



        gridOptions: {
        columns: [{
        field: 'incidentnm',
        label: 'Name'
        },{
        field: 'inspdate',
        label: 'Inspected',
        width: 150,
        get: function (object) { // allow export as a proper date
        return getDateTime(object.inspdate);
        },
        formatter: formatDateTime
        },


        In the example, formatDateTime is a function that would format your date. FYI, the attributes table and other widgets have extensive documentation in their relevent repo: https://github.com/tmcgee/cmv-widgets#attributes-tables



        formatting the find widgets table.



        This isn't as easy, since the widget hasn't received a lot of attention now that most people are using the Search widget that tmcgee has in the same repo. But its still possible if you modify the widget when the grid is created.



        Somewhere around these lines you would have to do this:



        this.resultsGrid = new Grid({
        selectionMode: this.selectionMode,
        cellNavigation: false,
        showHeader: true,
        store: this.resultsStore,
        columns: [{
        label: 'First Name',
        field: 'first'
        },
        {
        label: 'Last Name',
        field: 'last'
        },
        {
        label: 'Age',
        field: 'age',
        get: function(object){
        return (new Date() - object.birthDate) / 31536000000;
        }
        }]
        }, this.findResultsGrid);






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 21 '17 at 23:03









        twoLeftFeettwoLeftFeet

        354110




        354110






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f225186%2fchanging-data-types-within-the-cmv-map-service%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Щит и меч (фильм) Содержание Названия серий | Сюжет |...

            is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

            Meter-Bus Содержание Параметры шины | Стандартизация |...