Masking URLs in Attribute Table

362
1
Jump to solution
09-26-2017 12:26 PM
JaysonLindahl
Occasional Contributor

Not sure if this is the right group or now, but it looks like there are lots of developers out there, so I'm sure to find some insight.

I've been looking for a way to "mask" URL values in the Attribute Table.  Through my research, I've found a portion of code in the {appid}\jimu.js\utils.js file called "getFormattedUrl:" under "mo.fieldFormatter".

I've altered this line of code "'<A href="' + link + '" target="_blank">' + link + '</A>' +" to "'<A href="' + link + '" target="_blank">More Info</A>' +".

Now, anytime anything is displayed in the Attribute Table I see my "mask".

This is awesome for what I need.  

As for my question(s), does anyone see anything wrong with this, could this be customized to utilize a config file, and has anyone else found any other ways to accomplish this?

Jeff Shaner‌ dlaw-esristaff

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jayson,   

I see nothing about your change that will cause any issues for you. As far as making the hyperlink text configurable. You could change the exports.generateColumnsFromFields function in the AttributeTable utils.js file to look for a specific field name and if that is found then use a custom column formatter function to replace the hyperlink text from a property in your config.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Jayson,   

I see nothing about your change that will cause any issues for you. As far as making the hyperlink text configurable. You could change the exports.generateColumnsFromFields function in the AttributeTable utils.js file to look for a specific field name and if that is found then use a custom column formatter function to replace the hyperlink text from a property in your config.