- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 07:24 AM
The picture below shows what I've done to get a field highlighted based on the fields value
I have a feeling that I may have got the syntax wrong as this field is a string and not an integer/choice field.
I would welcome any feedback.
TIA
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2015 07:58 AM
Angus,
Use the below code:
function onChange(control, oldValue, newValue, isLoading) {
var cTypeLabel = $('label.incident.contact_type');
var cTypeField = $('incident.contact_type');
if (newValue == 'Self Service') {
cTypeLabel.setStyle({backgroundColor: "red"});
cTypeField.setStyle({color: "red"});
}
else {
cTypeLabel.setStyle({backgroundColor: ""});
cTypeField.setStyle({color: ""});
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 07:32 AM
Can you explain what is the issue you are facing? Is the style not working?
Is content_type field available on Incident table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 08:08 AM
The style is not working at all Saritha, apologies it should be contact_type and it is available on the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 07:33 AM
in your query is "Site Surgery" the value of that field or the label for the value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2015 07:44 AM