- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2023 09:51 AM - edited ‎11-20-2023 11:44 AM
we have created a new property, when the property value matches with assignment group name then in incident form there is choice field, that field sets the value automatically, now we have newly added another group, so we created another property as well.
i want to again match property value with newly created group to set field with different value name called "TSIC", in the same code where to write the ( var, else if) codes.
#incident#business rule#else if
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2023 11:58 AM
Sorry, I
var newValue = current.assignment_group.getDisplayValue();
var telcom = gs.getProperty('test_tsoc_groups');
var newProperty = gs.getProperty('newProperty');
if (newValue.match(telcom)) {
var assGrp = current.assignment_group.name.toString();
var grpSysPrp = gs.getProperty('Test.res.subres.field.open');
if(grpSysPrp.indexOf(assGrp)!=-1) {
current.u_inc_type = 'TSOC_NV';
} else {
current.u_inc_type = 'TSOC';
}
} else if (newValue.match(newProperty)) {
//Do something
} else {
current.u_inc_type = 'None';
}
still don't understand from your description, something like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2023 11:06 AM
Hi, unfortunately your post doesn't make your requirement clear. is this what you were looking for?
If not, then perhaps you could update the thread to clarify your question\issue.
if(someCondition) {
//First condition met
}else if (someOtherCondition) {
//Second condition met
} else {
//No conditions met
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2023 11:34 AM
we have created a new property, when the property value matches with assignment group name then in incident form there is choice field, that field sets the value automatically, now we have newly added another group, so we created another property as well.
i want to again match property value with newly created group to set field with different value name called "TSIC", in the same code where to write the ( var, else if) codes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2023 11:58 AM
Sorry, I
var newValue = current.assignment_group.getDisplayValue();
var telcom = gs.getProperty('test_tsoc_groups');
var newProperty = gs.getProperty('newProperty');
if (newValue.match(telcom)) {
var assGrp = current.assignment_group.name.toString();
var grpSysPrp = gs.getProperty('Test.res.subres.field.open');
if(grpSysPrp.indexOf(assGrp)!=-1) {
current.u_inc_type = 'TSOC_NV';
} else {
current.u_inc_type = 'TSOC';
}
} else if (newValue.match(newProperty)) {
//Do something
} else {
current.u_inc_type = 'None';
}
still don't understand from your description, something like this?