cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Return File Url from sp to Powerapps

Hi,

I am using the form's attachments control to upload files from PowerApps to SP library.

I want to retrieve and display the URL in a text input for example.

my code:

OnAddFile:

Set(JsonAttachment,JSON({FileName:First(Attachments2.Attachments).Name,File:Image4.Image,RecordID:ThisItem.ID},JSONFormat.IncludeBinaryData));

Set(myLinksvar,FINAttachmentsHELPE.Run(JsonAttachment))

 

my flow

Ask in PA-->Parse JSON-->Create file SP-->Compose-->Respond to PA.

in the respond to PA i have a text (LinkToFile) and i use the Output of the compose where i construct the url.

when i enter a label with: myLinksvar , i am geting a boolean value "true"

I cant get the link from myLinksvar.LinkToFile.

Any ideas why this isnt working?

And also, what is the "Unsaved" next to the attachment name in the dataCard? Can it change?

 

8 REPLIES 8
Highlighted
Helper IV
Helper IV

Re: Return File Url from sp to Powerapps

aaaaaaaaaaaaaaaa.png

the red arrow points on Image4 

ccccccccccccccccccccccccccc.png

Highlighted
Solution Sage
Solution Sage

Re: Return File Url from sp to Powerapps

Hello @marial16 

Have you checked the output value of the Compose action when you execute the flow and see if it's the desired value?

Regards,

Ferran

Highlighted
Helper IV
Helper IV

Re: Return File Url from sp to Powerapps

Yes it returns the correct url

Highlighted
Solution Sage
Solution Sage

Re: Return File Url from sp to Powerapps

Hello @marial16 

Have a look at this thread, please: https://powerusers.microsoft.com/t5/General-Power-Automate/Return-data-to-Powerapps-issue/td-p/12438...

It seems there are some issues with Power Apps and Power Automate when returning values. Some of the proposed solutions refer to recreate the same exact flow but with a new name, and call it from Power Apps (read what @soziblewuup posted in the thread):

response.png

 Hope it helps!

Ferran

Highlighted
Helper IV
Helper IV

Re: Return File Url from sp to Powerapps

Well, i have not found a solution yet!

I added the following steps..after the create_file, And i am getting an error in the Run() [data returned in the response is invalid]!!

 

zzzzzzzzzzzzzzzzzz.png

dddddddddddddddddddddddddd.png

Any ideas?

Highlighted
Solution Sage
Solution Sage

Re: Return File Url from sp to Powerapps

Hello @marial16 

Your previous flow was right. Have you tried to recreate it from zero with another name and try it from PowerApps?

Highlighted
Helper IV
Helper IV

Re: Return File Url from sp to Powerapps

Hi,

you mean recreate it outside the app ? 

Highlighted
Microsoft
Microsoft

Re: Return File Url from sp to Powerapps

Hi @marial16 ,

 

Would you please use "uriComponent()" formula before sending the URL value to PowerApps? Link

 

image.png

 

Hope this helps. Thanks!

Best regards,

Jisung Han

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,478)