RITM approvals

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2023 02:47 AM - edited ‎09-08-2023 03:01 AM
i have below requirement
field1: Request Type
field2: State(LIST Collector)
Data Owner Approvals:
order1,individual user needs to be triggered
after individual user is closed group approvals needs to be triggered
group1,group2,group3
group1 condition: if request type is B and state is NY then trigger the approval to group and all the members of group needs to be approved.
group2 condition: if request type is B and state is PA then trigger the approval to group and all the members of group needs to be approved.
group3 condition: if request type is B and state is SA then trigger the approval to group and all the members of group needs to be approved.
how can we write a script in the workflow.
i used below script but its not working
answer = ifScript();
var state = current.variables.state.getDisplayValue();
function ifScript() {
if (state.indexOf("NY") > -1) {
return 'yes';
}
return 'no';
}
could someone please help on this
please find the screenshot of workflow below