Hello everybody!
First of all, I don't know if this is the right forum (here in general) to post this type of question.
I would like to set the color of a value of a field (in the view).
I have 2 columns:
- The first is of type booleanType yes/no - 2 options
- And the second is of type LookupType.
I would like the first column when set to "No", the text color of the lookup to have a different color and a bold/font-weight.
How do I style this? I have the following:function validate(rowData) {
var str = JSON.parse(rowData);
var valid = str.acr_valid_Value; //get first attribute
var name = str.acr_name; //get second attribute
if (valid._label == 'No') {
console.log("into in " name " change color please!");
}
}
Then in Asset Views, I choose the column (the second one) to change properties, I choose the web resource that is the .js and I pass it the name of the validate function, which is my case. The example of the function is taken from here.
Thank you.
Andrei
Hi
Thank you for your help. It's hard to believe how hard MS makes for a simple color change.
Regards.
Hi andreicr,
Maybe you can try to use PCF controls--Colorful Optionset Grid(Colorful Optionset Grid | PCF Gallery).
Using this control, you can show the OptionsSets using the colors customized using the standard experience. Starting with the release 8, the ColorfulOptionsetGrid works also for Boolean/TwoOptions and for MultiSelectOptionset/MultiSelectPicklist.
You can download zip file:Release Release 8 - boolean and multipleOptionSets · brasov2de/ColorfulOptionsetGrid · GitHub
Then you can refer Guidance Notes to customize view as your need:GitHub - brasov2de/ColorfulOptionsetGrid
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156