Loading...

{Do you know} Select columns downloaded on mobile devices on Power Apps

{Do you know} Select columns downloaded on mobile devices on Power Apps
Hello Everyone,





Today I am going to share my thoughts on selecting the columns downloaded on mobile devices on Power Apps.







Let's get's started.


In Power Apps, when using a mobile device to download data (e.g., from a gallery or table), selecting specific columns for downloaded depends on how the data is structured and exported. Here's how you can do it:



Option 1: Use Export Control (Excel or CSV)


If you are exporting data for download, follow these steps:


1. Use the Export Control (for Dataverse tables)
  • Add the Export Control in Power Apps.
  • Connect it to the data source (e.g., a Dataverse table or collection).
  • Configure the columns by pre-filtering the dataset using the ShowColumns() function.


2. Use ShowColumns() to Select Specific Columns

In your Power Apps formula, filter the dataset before exporting:

ClearCollect(

   ExportData, 
   ShowColumns(
       MyDataSource,
       "Column1", "Column2", "Column3"
    )

)


This ensures that only the specified clumns are included in the download.




Option 2: Use Collections for Custom Export


If you want more control over which columns appear in a downloaded file:


1. Create a Collectio with Specific Columns



ClearCollect (

    FilteredData,
    ShowColumns(
              MyTable,
              "Name", "Email",  "Phone"


        )

)



2. Export the Collection Data


 Use SaveData(FilteredData, "MyData") to score it locally.

For CSV export, use Power Automate to convert it into a downloadable file.






Option 3: Customize Gallery for Column Selection


If the user needs to choose columns dynamically:

1. Create a Checknox List for Column Selection

Add checkboxes with column names.

Store selections in a variable (e.g., SelectedColumns).


2. Filter Data Based on Selection


ClearCollect(

    DynamicExport,
    ShowColumns(
            MyDataSource,
            If(Checkbox1.Value, "Column1", ""),
             If(Checkbox2.Value, "Column2", ""),
             If(Checkbox3.Value, "Column3", ""),
       )


)


This dynamically selects columns before exporting.



Best Practices for Mobile Downloading



Use ShowColumns() to limit unnecessary data.

Optimize performance by using collections instead of querying large datasets.

For CSV or Excel exports, integrate Power Automate for structured file creation.




Steps to Create a Power Automate Flow for Exporting Selected Columns


This method will allow users to select specific columns in Power Apps and download the data as a CSV file.



1. Create  a Flow in Power Automate


  • 1. Open Power Automate https://make.powerautomate.com)
  • 2.Click + Create --> Select Instant Cloud Flow.
  • 3. Choose Power Apps as the trigger  --> Name the flow --> Click Create.




Add an HTTP Response for Power Apps

1. Click  + New Step --> Search for "Initialize Variable".


  • Name SelectedColumns
  • Type Array
  • Value: Leave empty (will be passed from Power Apps).


2. Add " List Rows" action to fetch data from your Dataverse table (or SharePoint, SQL, etc.)

 Select your Table Name.

Under Filter Query, use:
  • ShowColumns (DataverseTable, "Column1", "Column2", "Column3")
  • Alternatively, use OData Queries to select specific fields dynamically.


3. Add "Create CSV Table" action.


From: Select output from the previous "List Rows" action.
This convert the selected data into a CSV format.


4. Add " Compose" action.

Input: Select output from "Create CSV Table".


5. Add "Respond to a PowerApp or flow" action.

Add an Output --> Choose File --> Set Value to output from "Compose".

This sends the CSV file back to Power Apps.







3. Call the Flow from Power Apps
  • 1. In Power Apps, create a button labeled "Export Data".
  • 2. Connect the Power Automate Flow to Power Apps:

In Power Apps, select the button.
In the OnSelect property, add:


Set(

    ExportFile,
     'YourPowerAutomateFlow'.Run(
                ShowColumns(MyTable, "Name", "Email", "Phone")
         )

);
Download(ExportFile)



This runs the Power Automate Flow, downloads the CSVfile, and allows the user to save it.




That's it for today.


I hope this helps.

Malla Reddy Gurram(@UK365GUY)
#365blogpostsin365days





Published on:

Learn more
MICROSOFT DYNAMICS CRM /365  BLOG
MICROSOFT DYNAMICS CRM /365 BLOG

This blog is all about MS DYNAMICS CRM DEVELOPMENT, C# .NET,SQL SERVER

Share post:

Related posts

{How to} use code interpreter on customer uploaded files in agent conversations in copilot studio

Hello Everyone,Today I am going to share my thoughts on the use of the code interpreter on customer-uploaded files in agent conversations in c...

4 months ago

{Do you know}Evaluate test sets with multiple graders in Copilot Studio

Hello Everyone,Today I am going to share my thoughts on the evaluation test sets with multiple graders in Copilot Studio.Let's get started.Yes...

4 months ago

{How to } Make Power Page Portal WCAG 2.1 Level A and AA Standards

Hello Everyone,Today I am going to share my thoughts on how to make power pages portal according to the WCAG 2.1 Level A and AA Standards.Let'...

4 months ago

{How to }Make your copilot multilingual in Microsoft Copilot Studio

Hello Everyone,Today I am going to show how to enable Microsoft Copilot Studio Multilingual.Let's get started.To make your Microsoft Copilot (...

4 months ago

{How to} Use IVR with Omnichannel for customer service in Copilot Studio

Hello Everyone,Today i am going to share my thoughts on using IVR with Omnichannel for Customer Service in Copilot Studio.Let's get started.To...

4 months ago

{How to} Enhance IVR with generative answers optimized for voice in Copilot Studio

Hello Everyone,Today I am going to share my thoughts on the Enhancing IVR with generative answers optimised for voice in Copilot Studio.To enh...

4 months ago

{How to} Use answering machine detection and proactive engagement tools in Copilot Studio

Hello Everyone,Today I am going to share my thoughts on how answering machine detection and proactive engagement tools work.Let's get started....

4 months ago

{How to } Publish Copilot Agents to WhatsApp

Hello Everyone,Today i am going to share my thoughts on how to publish the copilot agent to whatsapp channel.Let's get started.To publish a Mi...

5 months ago

{How to} Request Information from humans in the loop in Copilot Studio Agent flows

Hello Everyone,Today I am going to share my thoughts on how to request information from humans in the loop in Copilot Studio Agent flows.Let's...

5 months ago

{How to} Reassign an copilot agent's owner with Power Platform API

Hello Everyone,Today I am going to share my thoughts on how to reassign an copilot agent's owner with the Power Platform API.Let's get started...

5 months ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy