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 / Button to trigger a fl...
Power Apps
Answered

Button to trigger a flow opens Sharepoint

(0) ShareShare
ReportReport
Posted on by 90

Hi,

 

I have built an app and within the app I have a button that submits a form, and then triggers a flow which all works fine. 

 

The issue I'm having is the code seems to be opening sharepoint once it has ran to complete which I need to avoid, but I can't see why. I have pasted my code below.

 

Thanks.

 

 

// convert the table data into a JSON
Set(
varJSON,
JSON(
ShowColumns(
IDFWResponse,
"UserResponse",
"field_1",
"field_2",
"field_3",
"field_4",
"field_5",
"field_8"
),
JSONFormat.IndentFour
)
);
// run the flow
Set(
varCSVFile,
IDWFPowerAppsToExcel.Run(varJSON, varUniqueID).linkoutput
);
// download the file to Excel
Download(varCSVFile);

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 2 on at

    Hi @la09 ,

     

    The described behaviour is triggered by the Download() function:

     

    When used on the web, Download is dependent on the browser's settings to determine what happens with the file. For images, videos, PDFs, and other file types that the browser natively supports, a new browser tab is opened to display the file.

     

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-download

  • la09 Profile Picture
    90 on at

    Okay thanks, is there a way to download the file without opening the site directly after?

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

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard