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?
Solved! Go to Solution.
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.
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.