web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Export all data if blank
Power Apps
Answered

Export all data if blank

(0) ShareShare
ReportReport
Posted on by

Hi Team,

 

Good Day,

 

For your usual assistance, I want to export all data if there's no selection on the text query. Also, I tried the || on the query and it's not working. like Startswith() || Startswith(). Thank you

 

nmlsanmiguel_0-1683013116597.png

 

 

nmlsanmiguel_1-1683013142011.png

 

Categories:
  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    HI @nmlsanmiguel ,

     

    Currently you are passing the formula itself as text to the flow, so that is why the formula shows up in the subject of the email notification.

     

    For a suggestion to resolve this issue, can you please give an example of how the data should be formatted when passed to the flow? Should it be a JSON string?

  • nmlsanmiguel Profile Picture
    on at

    Yes, JSON string will do. We will need a dynamic export function if possible where the values to export are based on filters / Gallery Selected Items? Thank you.

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @nmlsanmiguel ,

     

    In that case the first argument of the run function should look something like the below:

     

    JSON(
    	ShowColumns(
    		Filter(
    			DataSourceName,
    			StartsWith(
    				Month,
    				FilterByNameDacion.Text
    			)
    		),
    		"Title"
    	),
    	JSONFormat.IncludeBinaryData
    )

     

    To get the filter conditions correct, can you please share which columns you wish to filter, what their type is, what you want to use to filter them and how the conditions interact (the logic). For instance:

     

    Filter the Month column (Date type), using the selected Month in DropDown1 and the Assigned User column (Person type) by the selected Email in ComboBox1.

  • nmlsanmiguel Profile Picture
    on at

    Thanks for this. I will try this formula today. For the columns. I want to filter the data by Month or Year columns. They are delegable because I have manual trigger power automate that will get the Year and Month from my datecolumn. Also to make it more dynamic. If the user have not selected any filters or the combobox1 and textbox filters are blank, if the user click the export button. I want to export to csv all the data showed in gallery. the data from my combobox1 was also a choice column in my sharepoint list.

  • nmlsanmiguel Profile Picture
    on at

    I also have another question, is the formula applicable since I have powerapps trigger as text?

     

    nmlsanmiguel_0-1683074276102.png

     

  • BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @nmlsanmiguel ,

     

    Since the JSON formula returns a JSON string, it is compatible with the text type in Power Automate, so that works.

     

    With regards to the filter conditions, the info you gave is useful, but not everything needed to give the formula. Can you please share the information as requested in my previous post?

     

     

  • nmlsanmiguel Profile Picture
    on at

    Hi sir,

     

    Thanks for replying.

     

    here's the columns I want to filter. By STATUS (Choice Column), Month and Year Column (Text Column) Thank you.

     

    nmlsanmiguel_0-1683102761939.png

    nmlsanmiguel_1-1683102813637.png

     

     

  • Verified answer
    BCBuizer Profile Picture
    22,899 Super User 2026 Season 2 on at

    Hi @nmlsanmiguel ,

     

    Please complete the below to give what you wish to filter by:

     

    ColumnName ColumnType FilteredBy
    Status Choice ###?
    YEAR Text @@@?
    Month Text FilterByNameDacion.Text?

     

    This will help to complete the formula:

    JSON(
    	ShowColumns(
    		Filter(
    			DataSourceName,
    			Status.Value = ### ||
    			YEAR = @@@ ||
    			StartsWith( Month, FilterByNameDacion.Text)
    			)
    		),
    		"Title"
    	),
    	JSONFormat.IncludeBinaryData
    )

     

  • nmlsanmiguel Profile Picture
    on at

    Thank you very much, will try this today after my office stuff. will accept the solution once worked. Have a wonderful day! 🙂

  • nmlsanmiguel Profile Picture
    on at

    Thank you for this sir, I accepted it as a solution to my problem. It helped me to build this code.

     

    Set(varNAFSDacion,
    JSON(
    ShowColumns(With(
    {

    ExportData:
    Filter('Luzon NAFS Dacion',STATUS.Value = ComboBox1.Selected.Value || ComboBox1.Selected.Value = Blank())},

    Sort(
    Filter(
    ExportData,
    FilterByNameDacion.Text in Title ||
    FilterByNameDacion.Text in STATUS.Value ||
    FilterByNameDacion.Text in 'ACCOUNT NAME'||
    FilterByNameDacion.Text in LAN ||
    FilterByNameDacion.Text in 'REPO DATE' ||
    FilterByNameDacion.Text in 'PMS Booking Date'||
    FilterByNameDacion.Text in UNITS.Value ||
    FilterByNameDacion.Text in YEAR ||
    FilterByNameDacion.Text in Month),'REPO DATE',SortOrder.Descending)),

    "Title",
    "UNITS",
    "LAN",
    "ACCOUNTNAME",
    "STATUS",
    "REPODATE",
    "PMSBookingDate"),

    JSONFormat.IncludeBinaryData));Devanie2.Run(varNAFSDacion,User().Email)

     

    It finally worked. Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard