Hi All,
Is there an attribute rule or a setting in the egdb that would enforce that all text entered in an attribute field would be upper case - no matter how it was typed?
Thanks,
Lorinda
In the the first sequence you haven't done anything to the original value of your variable 'cmts'. You do in the second sequence. Very cool.
var cmts = $feature.Comments var Uc = Upper(cmts) return Uc;
Here I create a new variable and return it. Not as cool. No need to create a variable because you use the object properties.
Hi Joe,
This is the code that I used and published, but it wasn't giving me upper case text when I test in neither ArcPro nor in the web app. I checked, the column name is proper name - Comments.
var cmts = $feature.Comments
Upper(cmts)
return cmts;
So I changed it to be this:
return Upper(cmts);
And it worked - go figure.
Thanks for the validation that I was using the correct item, just slightly wrong syntax.
In the code below, I concatenate a bunch of attributes and then use the proper() function to make the final text pretty. Use the upper () function instead in line 12...
var values = [$feature.NAME, $feature.POSTTYPE, $feature.POSTDIR] var combined_value = []; // Loop through the field values and test if they are null or empty strings // If they are not null or empty add them to an array for (var i in values) { var value = values[i]; if (IsEmpty(value)) continue; combined_value[Count(combined_value)] = value } // Return the field values concatenated with a space between return proper(Concatenate(combined_value, " "));
This fires on Insert and Update.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.