Posts

Showing posts from March, 2022

PowerApps - Merge Two Collections in to one Collection

In PowerApps, we can merge two collections in to one collection based on the unique value in the two collection. I had a requirement to merge two collections format as below, Employee Unplanned Leaves Data List - Collection 1 Employee ID  Employee Name  Employee Leave Date Employee Leave Applied Date Employee Unplanned Leaves Employee Planned Leaves Data List - Collection 2 Employee ID  Employee Name  Employee Leave Date Employee Leave Applied Date Employee Planed Leaves These are two different collection and we need to merge these two items based on the employee id. I have used following formula to merge the collections ClearCollect(     OutputCollection,     Collect(              AddColumns(                                       collection1,                                       "Employee Planned Leave",                                       LookUp(collection2,EmployeeID=collection1[@EmployeeID],Employee Planned leave),                                       "Employee P

PowerApps - Back to Basics - With function

With function in PowerApps allow to simplify the complex formulas in to smaller functions. This will enable us to calculate the value or perform the operations as per the requirement. We can pass the Record or reference field names or named vales. Named values will work as variables with in the scope. Syntax for With, With  (          <<Record>>,          <<Formula>> ) Real Time Usage -  One of project, i need to filter the list based on Created Date and Created By user. Created Date = Today() Created By = User Logged in to the System. I have used following formula to achieve the functionality, With(    {       myList:       Sort(          <<Source List>>,          Created,          Descending       )    },    LookUp(       myList,       Author.Email = User().Email &&       IsToday(Created)    ) ) Here i am using the myList as a named value and filtering the Records based on User and Created Date. I am seeing the value to a Collation and bind

Filter Multiple Collections based on Dropdown selected value

One of my Project, i got a requirement to filter multiple collections and display the values in the Gallery.  Collection 1 - Employee Data - ID, Name, Manager Name, Grade ID, Collection 2 - ID, Manager ID Collection 3 - Manager Data - ID, Manager Name, Location. I have mapped the Dropdown with Employee ID. When User Select the Employee ID dropdown,  I have Used Following Formulae and mapped it to Gallery. Filter(     Manager,     ID in Filter(         Grade,         ID in Filter(             EmployeeID,             EmployeeDropdown.SelectedText.Value in ID         ).GradeID     ).Manager ID ) Hope this helps.

PowerPlatform - Limit Sharing

Image
In Power Platform, As a admin we can limit the users to share the canvas apps, We can configure this in the Managed environments Admin section. In the Power Platform Admin center, select Edit managed Environment in the Command bar. Following are different sharing details.  Don't set limits - By choosing this option there will be no limit for the sharing. Excluding Sharing with security groups - By choosing this option, sharing with Security groups will be excluded. We have child check box to check Limiting the total individual users can be shared. If it is No limit, no limit of the users. We can set maximum users to be set the users to share the app. By choosing the second option, and setting the check-box to 3 users, when we try to share the app more than 3 users, it will throw an error message Sharing the security group and more than 3 users are disabled.  

PowerApps Formulae - Exclude weekend formulae

While working on PowerApps I had a requirement from client to exclude the weekends and if user select the weekend throw an error and set the date selected to Friday if user select the date is Saturday or Sunday. By default we don't have option in PowerApps to achieve this functionality. But using the formulas below we can achieve this. Update following code on "OnChange" property of the Date picker.  Weekday(         Self.SelectedDate,         StartOfWeek.Monday     ) > 5,     Notify(         "You are not allowed to select Weekend. Please Select Date Monday - Friday",         NotificationType.Error     ); The formulae above will verify the selected day is Weekday or not. if it is not weekday, it will throw error. In the second part, we will set the Friday value if user choose Saturday or Sunday.   Set(         varUpdatedDate,         DateAdd(             Self.SelectedDate,             -(Weekday(                 Self.SelectedDate,                 StartOfWeek.M

PowerApps - Explicit Column Selection

Explicit Column Selection is an option PowerApps to improve the Performance. Microsoft provided an option to enable and disable the "Explicit Column Selection" as below. By enabling the Explicit Column Selection option PowerApps performance will be increased. Enabling Column Selection option allows to get the columns from the backend database (only for the Data verse and SQL). This will improve performance  by retrieving only the data in the rows and columns that are necessary.   For example, If we are selecting the Employee table, we try to display Employee Name and Address fields in the gallery, Enabling the setting will get only Employee Name and Address. If we disable the field it will get all the data from Employee table. Getting required fields and Getting all the fields will be affected the Performance of the PowerApps like we have 10 columns in a table of 2000 rows with size 412 bytes, we are just pulling 2 columns less than 100 bytes. There are few issues with enabli