Power Platform and SharePoint tips
PowerApps let available a diverse way to build code-less specific solutions for each business and if you add Power Automate and SharePoint to it you can go even further. But there are small details that we all have to be aware of when developing or building an application.
Delegation
Let's say that you want to work with a huge SharePoint List from your site that is already set for a business process or something similar in PowerApps. You can definitely do that but you need to be aware of the amount of data and other details about delegation and some SharePoint exclusive boundaries.
You can face trick, unbelievable questions and concepts like a non rational thought where "the same can not be exactly the same". What I mean by that is like when you use Filter function in PowerApps to get a list with more than the delegation limit set (2000 items is the highest delegation limit by now) and it doesn't return all items. If we take a closer look in our formulas in PowerApps, we will find results like:
Not(MyBooleanField) or !MyBooleanField is not the same as MyBooleanField = False?
Or
IsBlank(MyTextField) is not the same as MyTextField=Blank()?
Or
MyConditionA && MyConditionB?is not the same as And(MyConditionA, MyConditionB)
Or
MyTextField="A" works really well but MyTextField<>"B" don't?
Now you understand what I meant by "the same.... is not exactly the same" for the delegation scenario and it can be confusing if you are a citizen developer or just a business user. We all assume that some things would be very obvious by language or programming languages and functions that already exists but in this case it is not. By limitation of some functions for SharePoint if you use a function or operation that does not support delegation you are going to have problem when bringing your data. So, be aware, read the documentation and use the correct functions to filter your large list.?
You can find the documentation about SharePoint and PowerApps here.
Power Automate and SharePoint file modified trigger in any folder
Let's say now you have a SharePoint library with some hierarchy structure in place and you want to use Power Automate to do whatever action you want to do based on the file modified operation.
You easily could think to use "if a file is created or modified" trigger operation but this one requires you to define which folder in the Library the event is going to happen. If you setup it with a Library and the Folder field in blank, what is going to happen is that the Flow will only trigger if someone else upload a file in the Library root path. And then we struggle thinking that "well, I actually want if any file is modified in this library no matter the folder"!
The workaround here is to change the trigger to "if a file is created or modified (property only)"! By using this properties trigger you have the action of adding a file in your Library does not matter in which folder.
领英推荐
Header, menu and output properties
If you want to use a header to your application containing a basic menu interacting with other components in the screen remember that you can create a component, set an output property and configure this output in another component. For example you could have a button in your header with an output type Boolean and configure it in a left menu component visible property. By this way you could control the visibility of one component by other component control.
Same Form with multiple lists
Well, depending on what is the need or how your business process is and if you are using SharePoint to store information you can have multiple lists using the same form if both have the same content type. So, imagine that you have a business scenario with two business stages in place and it must differ the content using different lists according to its stage. You could have a drop down list control where the user would choose the list context, for example, and it would change the DataSource and DefaultItem properties in your form.
By choosing the desirable context you can add an item in the context list using the same form.?
Azure AI
Remember that for Enterprise Plan you still have some AI Azure components that have free pricing plans! Functionalities that you can add in your Power App to work with SharePoint files, Power Automate and Azure AI to do some interesting stuff such as getting an image description based on AI confidence.
Attachment control
You can create solutions to upload a file from PowerApps into a SharePoint library using the "Add picture" control but it is not a proper experience for end-users because it will only show image files at first with the option to change the file type filter to all files.
There is another way using a hidden component! Did you notice that when you have a form connected to a list in SharePoint the Attachments controls shows up? If you just cut and paste that component outside of your form you still can use it and configure according to your need. The users can have a better experience selecting the files they want regardless to file type and you could create a logic to upload multiple selected files in this component to a SharePoint library using Power Automate.
You can watch a quick and clear tutorial created by Shane Young from SharePoint community.
Pop-up box
The easiest way to create a pop-up box with an overlay is using the Container component. You can set the container component with the height and width from the parent (screen), set the background colour to have transparency of 0.5 and create a small box inside composed of a rectangle, labels and buttons that interacts with the parent visible property. Make the children controls gather the visible property from the container and make the buttons to interact with the context or a global variable being used in the container visible property.
And the structure would be like the image below: