cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Dual Super User
Dual 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
Dual Super User
Dual 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

Dual Super User
Dual 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

Dual Super User
Dual 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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,424)