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

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

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

yashag2255
Dual Super User II
Dual Super User II

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

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!

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

yashag2255
Dual Super User II
Dual Super User II

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!

 

@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.

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

yashag2255
Dual Super User II
Dual Super User II

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (35,184)