Because the query will be performed dynamically in power automate and in flow we can get all that data generate an html table send it out in an email create a csv file with that data.
Converted into a pdf and a lot more so let's check it out in action i have a power app the home screen for which has a gallery.
That showcases data from a sharepoint list the sharepoint list has over 2000 records it is exceeding the delegation limit for.
Power apps which can be set to a maximum of 2000. the scenario here is to export data from powerapps and the data that will be exported should be dynamic in nature the.
User can leverage the filters that are provided in powerapps to further refine the data so let's filter the data where the progress of the task is blocked.
This will call a power automate flow that will in turn go ahead and trigger the process of exporting that data and sending it out to the current logged in user in an email.
The email that i have received contains all those four tasks that have the progress blocked and the priority critical the data is exported in tabular format.
In rich html manner directly inside the email as a table plus the data export has also been provided in a csv format.
And the data export has also been provided in pdf powerapps runs into a delegation challenge or a scenario in which your query is.
Delegable in which case a gallery will load data only in batches of hundred let's filter the tasks where the progress is in progress and the priority let's say is high.
Posts Related:
Now if you look at the gallery count
It's a hundred the query is delegable against sharepoint now if i scroll down to the hundredth record only then it.Will load the next hundred so if i try and export the data directly from my gallery i would run into the scenario wherein my gallery may not have all the data loaded.
Plus if i load all the data in a collection in powerapps i would run into the delegation scenario and if i do get data in powerapps let's say up to the delhi.
Gable limit as well which is 2000 max to send all that data from power apps to flow there would be a performance bottleneck purely because powerapps will have to transfer all that data to power.
Automate power automate will have to read all that information and then perform the export in this scenario if i hit export i am actually performing the query.
Dynamically inside of power automate and not in power apps powerapps is only sending the information of the query to be performed to power automate.
In progress priority high if i look at the email that i have received for this i have way more than 200 items this actually includes the entire result.
Set from my entire data source of 2000 plus items in sharepoint the same thing is true for my csv file that's exported the same thing is true for my pdf file.
As well that gets generated in my home screen i have a gallery the items property for which is my sharepoint list called work progress tracker.
That is connected in my power app
And this list has over 2000 records now to provide options for the user to filter the data directly in power apps let's say based on the title of the task.I will insert a text input control set its default value to empty and set the hint text to search for task title i will add a label right above this.
Called task title and this text input control i will rename it to txt task title i would like to filter this gallery where the title of the task starts with.
The text that the user enters in this text box filter my data source where i will use the start with function.
The text to be checked is from the title column in my sharepoint list and the starting string is that text box controls text property.
This completes my filter condition if i preview the app the text box is empty so it's loading all the data from my data source it's a deli gable query.
So it gets it in batches of 100 as i start typing in the text it will start querying my entire data set to search for tasks starting with that.
Specific task title and there are a total of 11 items in my entire data set that have that specific task title however if i search for task number four.
As you can see the gallery is showing a hundred items that means there are more tasks where the title begins with task four now in powerapps the user can see all.
The tasks by navigating through the entire data set in this gallery however if the user was to perform a query where the data is 100 and the user does.
Not scroll to the bottom how do i perform the export of all that data and that's why the idea is to perform the actual export operation the actual.
Query operation in power automate and not let power apps do all that work now to start a flow from powerapps make sure that you head over to settings go to upcoming features.
Search for power automate there should be a feature called power automate pane make sure you enable this this will give you an option in the left.
Navigation for power automate i can select that i can click on create new flow i will create a flow from blank will give this flow a name.
I've called it export tasks the trigger for this flow go ahead and delete this from the connectors pick power apps and choose the powerapps v2 trigger.
This has a nice feature wherein we can add input parameters directly through the trigger action itself i will add two parameters the first one type text.
I will call this my query the query that i want to perform in flow and for the second input i'll again pick type text.
I will call it mail2 who do you want to send the exported data to i will add a new step and use the get items action from the.
Sharepoint connector here i will connect to my sharepoint site and then pick my sharepoint list which is work progress tracker.
In here under advanced options we can add odata filter queries which allows us to filter our data in sharepoint.
I have done a full video on how to perform odata filter query on sharepoint lists or libraries for all column types i will highly recommend you to watch that i'll place the link for that video.
In the description of this video so do check it out now the query that i am trying to perform here is the same query that i'm performing in.
My powerapp which is whether the title column starts with a text that the user entered in my power app and typically the way you would write it here is.
Starts with title column and then in single quotes you'll put the text and this will perform the filter query in sharepoint.
Now bear in mind if your list is large the top count by default is 100 so make sure you plug this to 5000 that's the threshold limit for a sharepoint list.
And to ensure that it fetches all the data make sure you go to settings and turn on pagination the number here as well i will set it to 5000 so this will perform the filter query.
For me directly in flow however this query is what needs to be made dynamic and it needs to come directly from my powerapp.
And that i would be passing as a parameter from powerapp to flow and that parameter is called query so instead of hard coding the query here i will read the query from dynamic.
Content and i will pick query input parameter from the powerapps trigger the next step is for me to create my html table that i would like to send out.