Using SharePoint to store your organization data like documents is a great practice,
Also using the default functionality of SharePoint out of the box is a great way to manage.
But what happens when you want to customize your search options and document searching methods to your specific organization needs?
Using PowerApps and power Automate to build a custom SharePoint based searching app can help you achieve that goal.
In this article, I will go over the guidelines for creating the solution and the general concept, without delving deeply into the technical stages.
Here are 5 steps to follow in order to build a SharePoint based PowerApps and power Automate searching app:
Step one: Planning and setting up SharePoint site:
Planning is the first step in any app you may build.
Planning is the foundations stones of your app, and this is a step you must never skip.
things that I recommend considering while planning your SharePoint based PowerApps searching app
a. What is the goal of my app? (This is a general advice for any app you may create)
b. Who will be the end users? (Does your organization is technical ordinated or maybe is more old fashion?)
c. What devices will I use the app (desktop, mobile, teams?)
d. What is the data that I want to work with? (Word, excel, images, extra…)
e. What will be my search properties based on (the metadata that I want to add to my documents)?
f. App design (what will be the design structure based on)
After finishing planning all those key ingredients its time to build your SharePoint Document site.
-creating a SharePoint site where you will be storing your organization documents (the folder structure is totally up to you do decide).
Step two: build a library template and a custom manage document Properties
In SharePoint when you adding a file into a document library you will get a default properties that are searchable in that library, in our case we will want to add more properties to the document library and make those properties searchable.
a. create a document library that will be saved as a template and will be use all over the site, add columns to that library that you wish to be able to search in your PowerApps custom SharePoint document search app later.
b. Map your custom columns to be searchable in the SharePoint searching api by manage the search schema in SharePoint.
Step three: build a canvas app with your searchable fields.
After configuring and preparing the managed columns for the searchable api it is time to start building the app
a. Create a new canvas app with the fields to be searched and a gallery to show the end results.
Example for an app with custom fields and a gallery:
b. Send your data to your search flow.
Step four: build a power automate flow to be triggered from your app.
a. Prepare variables for the api call to be equals to the manage properties you prepared ( on step tow ,b) .
for example Extra-field1 is mapped into RefinableString105 so then we will run a compose control like that: if(empty(variables('extraField1')), '', concat(',RefinableString105:"', variables('extraField1'), '"'))
b. After preparing all the fields variables it is time to run the control “send an HTTP request”
c. Getting the results and parse them using Parse JSON control
d. Organize the results by using Select control:
e. Send back a response with the results:
Step five: process and using the results from the flow.
After getting the search results from the flow we will need to show those in the app and for that case we can use a gallery.
a. The flow will fill a collection with data of the results.
b. We will load that collection into the gallery.
c. The gallery will then show the results of the collection that was created
C1. Showing the file title by using thisIem.title.
C2. Open the file by using its path we got in our collection from the flow.
d. You can then add any manipulation and extra features you may want on the given results.
For conclusion, working with PowerApps and power automate to retrieve data from SharePoint can be very helpful and easy task to do,
The result will save time and hassle while ensuring a much more fun, customized and friendly user experience in your organization.
Enjoy,
yinon sade
Comments