If you like my video or the blog please subscribe to my YouTube channel to get me going https://www.youtube.com/channel/UC6vLzWN-3aFG8dgTgEOlx5g

In this video we learn some simple Power Apps functionalities:

1. Get current user Manager : Scenario can be that you to display or send an email to current user manager, in this video I have added a Label in Canvas App and used following formula. To make this work your Canvas App should have Office365users as data source which you can learn in Video how to add. The Manager function takes either email or principal id, in this we have passed email by yet another function “User().Email”

Office365Users.Manager(User().Email).Mail

2. Get current date week number : In lot of countries Week number is important, so there might be a requirement to display current date week number or selected date week number, to achieve this I had added another label in Canvas App and used following function

RoundDown(
     (RoundUp (
          Now() - Date(
               Year(Now() - Weekday(Now() - 1) + 4),
               1,
               3
          ),
          0
     ) + Weekday(
          Date(
               Year(Now() - Weekday(Now() - 1) + 4),
               1,
               3
          )
     ) + 5) / 7,
     0
)

3. Set Drop Down choices in Power Apps with SharePoint List Choice column: When we add a drop down in Power App Canvas App we can hard code drop down choices but what if we want to have same choices we already have on SharePoint list column, to achieve this we can use “Choices” function but before that we should add SharePoint List as data source for the Canvas App which you can check in the video, once that is done, add a Drop Down and use below function. Here “PowerAppDataStore” is the list name and “City” is column name whose choice values will be displayed

Choices(PowerAppDataStore.City)

4. Patch function – Drop down values in SharePoint : Since we added a drop down in above example we want to save data back to SharePoint on click of a button so how to do that, you can of course write a Power Automate but instead of that we can use “Patch” function which can save data back in SharePoint, in this example I have already a List “PowerAppDataStore” which has two columns “Title” and “City” which was already mapped to the drop down, so to use a button we can add it to Canvas App and then “OnSelect” property write below function, you can find more details in the video below

Here Patch takes 3 parameters, first is the source, second is record which is an item with defaults and 3rd values for each column which will be updated.

Patch(PowerAppDataStore,Defaults(PowerAppDataStore),{Title: "click here", City:Dropdown1.Selected})

Connect with me on Twitter or Linked In and follow YouTube Channel or my blog https://twitter.com/SinhaKislay

https://www.linkedin.com/in/kislaysinha

https://synkventures.com

https://www.youtube.com/channel/UC6vL…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s