cancel
Showing results for 
Search instead for 
Did you mean: 

Approvals Widget - approvalsFilter settings should be fixed and not decommissioned

We have successfully integrated the Power Automate workflow with our custom applications (which is a microservices-based application). We are referring the given below article for the widget integration and it has been integrated successfully but the ApprovalFilter condition is not working due to which it’s not possible to show the specific approval chain to the end-user.

 

https://docs.microsoft.com/en-us/power-automate/developer/embed-flow-dev

 

There is not much documentation from Microsoft around the ApprovalFilter and putting any other random condition does not throw any error in the application. We logged a support ticket with Microsoft Support group (2110260060001572) and got the response that it's deprecated and documentation will be updated. 

 

I understand your requirement for this feature. But, since we heard from PG team that this "approvalsFilter" setting is being deprecated, we have forwarded your feedback to them regarding the enhancement request and SDK code to confirm on the same.

 

There are several customers who are looking for this feature and this feature should not be depreciated.  We need to use this feature to filter the specific approval from the application. 

 

Please find the given below details on the same.

 

ApprovalCenterSettings

Applies to ApprovalCenter widgets.

JavaScript Copy

approvalCenterSettings?: {

   approvalsFilter?: string;

   tab?: string;but

   autoNavigateToDetails?: boolean;

   showSimpleEmptyPage? boolean;

   hideLink?: boolean

};

APPROVALCENTERSETTINGS

Parameter

Required/Optional

Description

hideLink

Optional

When set to true, the widget hides the received and the sent approval links

autoNavigateToDetails

Optional

When set to true, the widget automatically opens the approval details when only one approval exists

approvalsFilter

Optional

The approval widget will apply the specified approval filter when listing the approvals, for example: The approval widget will apply the specified approval filter when listing the approvals, for example:


approvalsFilter: 'properties/itemlink eq \'https://microsoft.sharepoint.com/teams/ProcessSimple/_layouts/15/listform.aspx?PageType=4&ListId=737...''

approvalsFilter: 'properties/itemlinkencoded eq \'{Your base64 encoded item link url} \''

tab

Optional

Default active tab to show in the Flow widget.
Valid values : 'receivedApprovals', 'sentApprovals'

showSimpleEmptyPage

Optional

Shows an empty page when there are no approvals

hideInfoPaneCloseButton

Optional

Hides the info-pane Close button (or the host already has a Close button)

 

Screenshot

 

Step-01) Running the application first show the

 

manojnegi_0-1636374089605.png

 

Step-02) Logged-in as the user with whom the approvals are pending.

 

manojnegi_1-1636374089609.png

 

Step-03) The widget will show the username as “Signed In as:” as user.

 

manojnegi_2-1636374089611.png

 

Step-04) Clicking on the “Load Approval Widget” does shows all the approvals pending and approval has been sent.

 

manojnegi_3-1636374089616.png

 

 

Step-05) As per Microsoft documentation on approvalFilter the following should be able to filter the list. However, we are unable to filter the list and there is no documentation the properties available to filter.

 

The approval widget will apply the specified approval filter when listing the approvals, for example: The approval widget will apply the specified approval filter when listing the approvals, for example:

 

approvalsFilter: 'properties/itemlink eq \'https://microsoft.sharepoint.com/teams/ProcessSimple/_layouts/15/listform.aspx?PageType=4&ListId=737...''

approvalsFilter: 'properties/itemlinkencoded eq \'{Your base64 encoded item link url} \''

 

Step-06) We are using the following code but it’s not working or if we switch to different properties also then also it’s not working –

manojnegi_4-1636374089622.png

 

manojnegi_5-1636374089627.png

 

In Microsoft community, there are couple of tickets were raise by different people but there is no response on this as such –

 

Reported User # 1

https://powerusers.microsoft.com/t5/Using-Flows/Approvals-Widget-approvalsFilter/td-p/752868

manojnegi_6-1636374089634.png

 

Reported User # 2

https://qiita.com/nanoka/items/12286d68f4523b20c3d6

manojnegi_7-1636374089642.png

 

manojnegi_8-1636374089649.png

 

 

 

Japanese to English translation

フィルタしてみたり、と言いたいところですが、さもフィルタができそうなものがありますが、うまく動作しませんでした。フィルタの書き方がわかりません。

manojnegi_9-1636374089656.png

 

 

 

 

Reported User # 3

https://powerusers.microsoft.com/t5/Using-Flows/Integration-of-flows-with-custom-sites-approvalsFilt...

 

@alistairhunt @SPDaniel - Please feel free to comment.

 

Status: New