cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
davidalanscott
Frequent Visitor

Path from powerapp dropdown

I've created a Powerapps + Flow camera app based on Shane Youngs tutorials. It works great uploading an image to a document library.

 

What I'm having trouble figuring out is how to create the Folder Path in flow based on a dropdown in the powerapp.

 

In my Library I have several folders based on Usernames, In my ideal scenario my users would choose their username from the dropdown, type in the filename, then flow uploads it to their folder based on that dropdown.

 

Is there a way I can do this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-zhos-msft Solution Sage
Solution Sage

Re: Path from powerapp dropdown

Hi @davidalanscott ,

It seems you want to upload the file to the corresponding folder depend on the username.

Does the folder name equal to the username or contains the username?

I have made a test on my side, please take a try with the following workaround:

Capture.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Path from powerapp dropdown

Hi @davidalanscott 

 

Yes you can do this. 

 
To create a file in Sharepoint Document library inside the specified folder name passed through the powerapps, please follow the below steps:
 
1) PowerApps:
    a) Create a Camera Control(lets say Camera2), a Text Input for File Name( lets say TextInput7) and a Dropdown containing folder Names(lets say Dropdown6).
    b) Create a button to trigger the flow. Now while you edit the button, go to Actions and select Flows. This will prompt to either use an existing flow or create a new one.
    c) In this case we have selected create a New, so this will open our flow in edit mode in a new window.
    
2) Flows:
    a) Powerapps trigger will be configured by default.
    b) Now add steps to create three variables, one to store FolderName, second to store FileName and Third to store the Image passed. Make sure you select "Ask in Powerapps" for all the three variables in the Initialize Variable action. This will ensure that three different variables need to be passed through our app.
    c) Now create an action to create file in SharePoint. Pass the three variables inside all the columns. We need to make a change for FolderName to concat the Shared Documents to it.
       Expression for folderName: concat('/Shared Documents/',variables('FolderName'))
    d) Save your flow and Navigate back to powerapps.
    
3) PowerApps: 
    a) Go to Button actions and select the newly created flow to add a connection.
    b) It will ask for passing the flow parameters.
        Expression: 'PowerAppsbutton-5'.Run(Dropdown6.Selected.Value,TextInput7.Text,Camera2.Photo)
    c) Save Everything and test out the button.
    
Note: To click the image before submit, you need to click once on the camera control to capture the current image that will be passed in Camera2.Photo

 

Please refer to the screenshotsMicrosoftTeams-image (84).png

MicrosoftTeams-image (83).png

 

Note: in the File Content use the expression 

dataUriToBinary(variables('Image'))

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-zhos-msft Solution Sage
Solution Sage

Re: Path from powerapp dropdown

Hi @davidalanscott ,

It seems you want to upload the file to the corresponding folder depend on the username.

Does the folder name equal to the username or contains the username?

I have made a test on my side, please take a try with the following workaround:

Capture.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: 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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,986)