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 / Retrieve more than one...
Power Apps
Answered

Retrieve more than one variable from a flow to PowerApp

(0) ShareShare
ReportReport
Posted on by 289

Hi community,

 

I have a PowerApps that uses flow to upload attachments from PowerApps to SharePoint. The flow is trigger by PowerApps, and at the end of the flow, I have a action of  "Respond to PowerApps or flow" where I set two variables: 

 

SharePointFileLink: where it retrieves the "Path" of the attachment in SharePoint

SharePointItemid: where it retrieves the "ItemID" of the attachment in SharePoint (see attached pic) Capture_Flow.PNG

 

I then have the PowerApps formula as :

 

Set(varFilePath, EasyUpload.Run(Last(Attachments_File_Test.Attachments).Name, varBase64Only).sharepointfilelink);

 

Is there anyway that I can get both variables, sharepointfilelink and SharePointItemid in one Set formula? Because I don't want to have the flow to run twice. 

 

I am not too sure how to retrieve both variables with the Set formula I have.

 

Any help is appreciated, thank you.

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,495 Most Valuable Professional on at

    Hi @lliu_western ,

    You could initialise a Variable before the last step and Concat the two with a delimiter in between, then respond with the Variable.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @lliu_western ,

    Do you want to get both variables in single one Set formula within your canvas app?

     

    If you want to get both variables  in single one Set formula within your canvas app, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    As an alternative solution, I think a Collection could achieve your needs. I have made a test on my side, please take a try with the following workaround:

    4.JPG

    Set the OnSelect property of the "Patch" button to following:

    ClearCollect(
     ReturnedResult, 
     'PowerApp->Createfile,RespondtoaPowerApporflow'.Run(AddMediaButton1.FileName, Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", ""))
    )

    On your side, you should modify your EasyUpload.Run formula in your canvas app as below:

    ClearCollect(
     ReturnedResult,
     EasyUpload.Run(Last(Attachments_File_Test.Attachments).Name, varBase64Only)
    )

    The ReturnedResult collection would be populated with proper data as below:

    5.JPG

     

    Then within your canvas app, if you want to reference the sharepointfilelink column value or sharepointitemid column value using formula below:

    First(ReturnedResult).sharepointfilelink

    or

    First(ReturnedResult).sharepointitemid

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards, 

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard