Solved– No function signature for the function with name ‘contains’ matches the specified arguments in Canvas Apps


We were getting the below error while trying to set the Items property of the Gallery control and were using Filters in the formula.

“The requested operation is invalid. Server Response: Sectors failed: No function signature for the function with name ‘contains’ matches the specified arguments. The function signatures considered are: contains(Edm.String Nullable=True, Edm.String Nullable=true).”

We were sure that the formula used was correct.

After trying for a couple of minutes more, we simply saved the app, and later when we again opened the app for edit, the error was no more there.

The same has been mentioned here –

https://powerusers.microsoft.com/t5/Building-Power-Apps/No-function-signature-when-filtering-using/td-p/592218

Hope it helps..

Advertisements

How to – Hide and show controls in Canvas App based on security role of the user (Dataverse / Dynamics 365)


Suppose we have the below Maker and Checker Canvas App, with two button one for raising the request and the other for approving and rejecting the request.

We have below custom security roles created in our Dynamics 365

  • Maker
  • Checker

Here we want Submit a Request button to be visible only to users with Maker security role and the Approve and Reject Request button to users with Checker role.

For this we can write the below formula on Visible property of the button.

Add the Users and Security Roles data sources first.

If(

LookUp([@’Security Roles’], Name = “Maker”, Role) in Concat(LookUp([@Users], ‘Primary Email’ = User().Email).’Security Roles (systemuserroles_association)’, Role & “;”),

true,

false

)

 

Based on email address of the user, we are comparing the Maker security role with all the different roles assigned to the user, which we are fetching from systemuserroles_association.

  • User function in Power Apps

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-user

  • Lookup function in Power Apps

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

Hope it helps..

If(LookUp([@'Security Roles'], Name = "Maker", Role) in Concat(LookUp([@Users], 'Primary Email' = User().Email).'Security Roles (systemuserroles_association)', Role & ";"),
true,
false)
Advertisements

Traffic information in the map component – 2020 Release Wave 2


The interactive Map component (preview) can now be enabled to show traffic information like traffic congestion, incidents, traffic flow using red, yellow, and green colors.

Before we can use the Map component (preview), we need to first enable it for the environment.

Navigate to the admin portal –

https://admin.powerplatform.microsoft.com/

Within features, enable the Geospatial services and save the setting.

Else we would be getting the below error while trying to add the map component to the canvas app screen.

Here we have added the map component.

And updated the default location.

Scrolling down within the properties pane, we can see the properties specific to traffic information.

  • Show traffic incidents – On / Off.
  • Traffic flow types – None, Relative, Relative Delay only.

Below is how it renders for different values for traffic flow types.

Traffic flow type = none

No data is shown

Traffic flow type = relative

Relative data to the free-flow of the road

Traffic flow type = relative-delay

Areas that are slower than average expected delay

More on Map component –https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/geospatial-component-map

Hope it helps..