Hello everyone,
I'm not great with JSON scripts and was grateful to find answers here for automating certain answers to survey forms using JSON scripts. The scripts in my survey (populating technician name based on ArcGIS Online username) are working just fine, but I want to change the color of the returned text (the technician's name). Branding is important to my company and our color palette has many shades of blue, and unfortunately the color of the tech's name at the moment is not very readable against the input background color.
I want to use a hex code to set a color for the returned text, but nothing I have tried so far seems to do it. I have tried inserting a font color parameter into the
pulldata("@json", ${member_lookup}, "firstName") + " " + pulldata("@json", ${member_lookup}, "lastName")
field in calculation column for the survey item in question, as well as within the body::esri:style column, in many different iterations, to no avail. I'm sure this is possible, but I can't seem to figure out how.
Help is appreciated, thank you!
Solved! Go to Solution.
You can only use html to set the font colour for labels and hints.
You can readily convert the result of a calculation to a hint or a label and set the colour on that. I've attached an example below (using a csv, rather than a json, but the working is identical).
I'm not sure what exactly you want to achieve, so I'm not sure if that works for you..
You can only use html to set the font colour for labels and hints.
You can readily convert the result of a calculation to a hint or a label and set the colour on that. I've attached an example below (using a csv, rather than a json, but the working is identical).
I'm not sure what exactly you want to achieve, so I'm not sure if that works for you..
Thanks Laurence! Your suggestion nailed it, actually - I just wasn't thinking outside of the box far enough. I appreciate it!