cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JV_DXB
Level: Powered On

Save value from Dropdown to Excel

I have created a Power App with Excel as a data source. One of the columns in the Excel is "Status" Column with status Open and Closed. I have added a drop down to my Power App and pulled the Status Column and used Distinct to show Open and Closed in the drop down. But, when I change the selection in the dropdown from Open to Close and save the form, it does not reflect back in my Excel and does not change the status from Open to Closed. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Save value from Dropdown to Excel

Hi @JV_DXB ,

Firstly, make sure that the excel file is closed when you edit it in PowerApps.

Secondly, make sure that the status is not a read-only filed. If it's a read-only field, then it can't be updated in PowerApps.

You don't need to use the function of patch.

Set the status's DataCard's Update:

Dropdown1.Selected.status 

Then, using the submitform will update the datacard's value.

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
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

Super User
Super User

Re: Save value from Dropdown to Excel

Hey! The code should be placed at the "Save" Control. You already have the submit form action on that so you can add a semi colon and add the code over there (onSelect property)

 

 

Hope this Helps. 

 

Thanks. 

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Save value from Dropdown to Excel

Hey!

 

Please refer to the expression below: 

 

Patch(Table1,LookUp(Table1,Name="Yash"),{Status: Dropdown2.SelectedText.Value})

Screenshot in powerapps editor:

 

MicrosoftTeams-image (15).png

 

Note: 

Use the mentioned formula to patch the updates into your excel file. Please check for below mentioned things:
1) The Excel file should not be open in Edit mode anywhere.
2) Check if the powerapps connection created an extra column (__PowerAppsId__) in youe excel sheet table.

 

Hope it helps!

 

Thanks, 

 

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!

JV_DXB
Level: Powered On

Re: Save value from Dropdown to Excel

Dear @yashag2255 

 

Thank you for your reply. Below screen from Power App. As you can see I have a dropdown and upon changing status from Open to Closed, I want the change to be saved back to the excel as well (open saving). I will have multiple fields being updated, not just the drop-down field. 

 

2019-05-28_0757.png

Super User
Super User

Re: Save value from Dropdown to Excel

Hi, 

 

Can you please share the snippet of the code that you have used. I have tried and tested that formula and it updates the Excel as well. 

 

Important Notes: 

 

Can you share where is your excel file located? It should'nt be a static file on your computer. It should be somewhere on the internet (I mean onedrive, dropbox etc). 

 

Also, it should not be opened while you are running the app. 

 

Thanks, 

 

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!

 

JV_DXB
Level: Powered On

Re: Save value from Dropdown to Excel

@yashag2255 

 

Where should I add your code? Should it be at save or at the dropdown? At Save, I already have SubmitForm(EditForm1). Also, the status can change from Open to Close or vice-versa.

Excel is located in OneDrive.

Community Support Team
Community Support Team

Re: Save value from Dropdown to Excel

Hi @JV_DXB ,

Firstly, make sure that the excel file is closed when you edit it in PowerApps.

Secondly, make sure that the status is not a read-only filed. If it's a read-only field, then it can't be updated in PowerApps.

You don't need to use the function of patch.

Set the status's DataCard's Update:

Dropdown1.Selected.status 

Then, using the submitform will update the datacard's value.

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
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

Super User
Super User

Re: Save value from Dropdown to Excel

Hey! The code should be placed at the "Save" Control. You already have the submit form action on that so you can add a semi colon and add the code over there (onSelect property)

 

 

Hope this Helps. 

 

Thanks. 

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 148 members 3,085 guests
Recent signins:
Please welcome our newest community members: