How do I use code to format fields in edit and default pop-ups?

2914
6
08-13-2015 06:57 AM
BrandonKeinath1
Occasional Contributor III

Hi all,

I'm attempting to fix a number formatting issue in the edit pop-up in a web appbuilder application.  The application seems to ignore my format code (probably because I'm doing it wrong).  I would like the numbers to display without the thousand separator but I'm not able to make changes appear when I edit the config_Edit.json file.  Is it being over-ridden by something else in the code?  Any ideas would be helpful.

I would also like this in the default pop-up without having to edit the pop-up in ArcGIS Online.  Pure laziness on my part; I already need to make application code changes and hitting the pop-ups is easier for me than using the AGOL user interface.

  1. { "fieldName": "ACCOUNTNUMBER"
  2.   "label": "Account Number"
  3.   "format":{ 
  4.   "places": 2
  5.   "digitSeparator": false 
  6.           }, 
  7.   "isEditable": true 
  8. },

Thanks,


Brandon

0 Kudos
6 Replies
BrandonKeinath1
Occasional Contributor III

Hi,

Just checking in to see if anyone has some thoughts on this.

Thanks,


Brandon

0 Kudos
BrandonKeinath1
Occasional Contributor III

Hi all,

I moved this question to try and get some help from another group.  I understand that there are non code solutions to this problem but I'm interested in the code so it can be part of a scripted process.

Thanks,


Brandon

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Hi Brandon...not a solution but in case you haven't seen this Posting Code blocks in the new GeoNet​  It helps when trying to get code to post (more so if doing Python when spacing is critical). 

BrandonKeinath1
Occasional Contributor III

Thanks Rebecca,

I remembered the post you mentioned only after I had created the question   And it's probably user error but when I try to edit the question to add the formatting it won't reflect after saving.

Brandon

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

ya, you pretty much have to copy it out, insert a formatting area, and paste.  That's what has worked for me, but even with instructions, sometimes it just doesn't want to cooperate.

BTW, have you seen this thread Re: How do I format a numeric field in a pop-up (WAB Developer)

(one of my Q's with Robert's A)Maybe it will help.

0 Kudos
BrandonKeinath1
Occasional Contributor III

Thanks Rebecca,

I think Robert's answer should work but for some reason it disable my edit widget when I add the format line.  I've posted my question/issue there too.

Brandon

0 Kudos