NITRO Custom Action configurations for two level approval process

Applies To: SharePoint Online and SharePoint On-premises

Please refer main article on Two-level Approval Functionality for the detailed description and other configurations. This article describes the custom actions configurations required for approval process described in that article. And ensure that the required list schema is created before configuring these custom actions.

Tickets list

Submit for Approval

Configure Variable

Configure “ApproverEmpty” variable

Action 1: QL_Approver Definition

Create Query list action to get the approvers from the Approval Definition list

Query:

<View><Query><Where><Eq><FieldRef Name='Category' LookupId='TRUE' /><Value Type='Lookup'>%%$lookupid([Category|Category1])%%</Value></Eq></Where></Query></View>

Action 2: Approve

Configure update item action to approve the Ticket based on the approval decision.

Conditions:

Advanced Condition: $parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L2Approver)

Action 3: Submit for level 2 Approver

Create “Add Item” action to create level 2 approval task

Conditions:

Advanced Condition: $parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L2Approver)

Column Mappings:

Task Name: $strcat(Approval Task for, ,[Title|Title])

Approval Level: Level 2

Assigned To: QL_Approver Definition##L2Approver

Related Ticket: [ID|ID]

Due Date: $add({Today},7:0:0:0)

Action 4: Update Ticket Approval Status II

Conditions:

Advanced Condition: $parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L2Approver)

Action 5: Submit for Level 1 approver

Create “Add Item” action to create level 1 approval task when the Ticket is submitted for approval.

Conditions:

Advanced Condition: $parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L1Approver)

Column Mappings:

Column Mappings same as “Action 3: Submit for level Approver”. Only change is to modify the Approval Level to “Level 1”.

Action 6: Update Ticket Approval Status I

Create “Update Item” action to update the Ticket on submitted for approval process.

Conditions:

Advanced Condition: $parsefieldvalue(ApproverEmpty##Value,String),,$parsefieldvalue(QL_Approver Definition##L1Approver)

Approval Tasks list

Approve

Action 1: Approve Related Ticket

Create “Invoke Custom” action to invoke the “Submit for Approval” custom action which is configured on Tickets list.

Action 2: Update Approval Comments in Ticket

Create “Update Item” action to update the Approver comments in Ticket.

Deny

Action 1: Update Related Ticket Approval Status to Deny

Create “Update Item” action to update the Ticket status to denied.