{"action":"created","issue":{"url":"https://api.github.com/repos/cmv/cmv-app/issues/441","labels_url":"https://api.github.com/repos/cmv/cmv-app/issues/441/labels{/name}","comments_url":"https://api.github.com/repos/cmv/cmv-app/issues/441/comments","events_url":"https://api.github.com/repos/cmv/cmv-app/issues/441/events","html_url":"https://github.com/cmv/cmv-app/issues/441","id":97072104,"number":441,"title":"Currency and Number Format in Attribute Table","user":{"login":"steven3535","id":6421452,"avatar_url":"https://avatars.githubusercontent.com/u/6421452?v=3","gravatar_id":"","url":"https://api.github.com/users/steven3535","html_url":"https://github.com/steven3535","followers_url":"https://api.github.com/users/steven3535/followers","following_url":"https://api.github.com/users/steven3535/following{/other_user}","gists_url":"https://api.github.com/users/steven3535/gists{/gist_id}","starred_url":"https://api.github.com/users/steven3535/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steven3535/subscriptions","organizations_url":"https://api.github.com/users/steven3535/orgs","repos_url":"https://api.github.com/users/steven3535/repos","events_url":"https://api.github.com/users/steven3535/events{/privacy}","received_events_url":"https://api.github.com/users/steven3535/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T15:01:54Z","updated_at":"2015-07-24T15:53:56Z","closed_at":"2015-07-24T15:53:55Z","body":"Here are a couple functions for formatting currency and numbers. Add these to the config/searchWidget.js\r\n\r\n```\r\ndefine([\r\n    'dojo/on',\r\n    'dojo/date/locale',\r\n\t'dojo/number',\r\n\t'dojo/currency'\r\n], function (on, locale, number, currency) {\r\n\r\n    function formatDateTime (value) {\r\n        var date = new Date(value);\r\n        return locale.format(date, {\r\n            selector:'date', formatLength: 'short'\r\n        });\r\n    }\r\n\t\r\n\tfunction formatCurrency(x){\r\n\t\tvar amount = new Number(x);\r\n\t\treturn currency.format(amount, {\r\n\t\tcurrency: \"USD\"\r\n\t\t});\r\n\t}\r\n\t\r\n\t//Use 'formatter:  formatCurrency' to set currency for a field.\r\n\t/*{\r\n\t\tfield: 'incidentnm',\r\n\t\tlabel: 'Name',\r\n\t\tformatter:  formatCurrency\r\n\t},*/\r\n\t\r\n\tfunction formatNumber(z){\r\n\t\tvar newNumber = new Number(z);\r\n\t\treturn number.format(newNumber);\r\n\t}\r\n\t\r\n\t//Use 'formatter:  formatNumber' to set currency for a field.\r\n\t/*{\r\n\t\tfield: 'incidentnm',\r\n\t\tlabel: 'Name',\r\n\t\tformatter:  formatNumber\r\n\t},*/\r\n```"},"comment":{"url":"https://api.github.com/repos/cmv/cmv-app/issues/comments/124565154","html_url":"https://github.com/cmv/cmv-app/issues/441#issuecomment-124565154","issue_url":"https://api.github.com/repos/cmv/cmv-app/issues/441","id":124565154,"user":{"login":"tmcgee","id":200780,"avatar_url":"https://avatars.githubusercontent.com/u/200780?v=3","gravatar_id":"","url":"https://api.github.com/users/tmcgee","html_url":"https://github.com/tmcgee","followers_url":"https://api.github.com/users/tmcgee/followers","following_url":"https://api.github.com/users/tmcgee/following{/other_user}","gists_url":"https://api.github.com/users/tmcgee/gists{/gist_id}","starred_url":"https://api.github.com/users/tmcgee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmcgee/subscriptions","organizations_url":"https://api.github.com/users/tmcgee/orgs","repos_url":"https://api.github.com/users/tmcgee/repos","events_url":"https://api.github.com/users/tmcgee/events{/privacy}","received_events_url":"https://api.github.com/users/tmcgee/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T15:53:55Z","updated_at":"2015-07-24T15:53:55Z","body":"@steven3535 thanks for the functions."}}