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

Values dissapear from Sharepointlist after editing row

Hello,

 

I have looked on a number of similiar threads but unfortunately haven't been able to find or figure out a solution. I have made an example to illustrate the problem:

 

Referencelist Ref contains single-text column Company and multi-line text column Prices. Prices is a string but the different entries are separated manually by ";" right now (there is no standardization for what values are put here). In the actual form I'm working on there are several other columns that make each row unique, if you're wondering why the list isn't distinct rows only. 

1.JPG

Sharepointlist Main contains single-text column Company and dropdown column Prices (with multiple values allowed enabled)

2.JPG

So Main is updated by values from Ref. In the form when creating a new row the user gets to choose one distinct value from Company and depending on this value, Prices is also determined. Prices is split by ";" (in order to let the user filter rows where certain Price-entries exist).

 

Creating a new row from the form works great, however when I edit the row the values of the ComboBoxes for Company and Prices are blank. If I reselect the correct value for Company the edit saves correctly, but If I edit the row and save without making a choice then Company is still correct but Prices defaults back to a blank value:

5.JPG              6.JPG

Below is a schema over the custom form and the values I figured were important:

4.JPG

Very frustrating, if anyone has any tips on what to try please let me know! 

1 ACCEPTED SOLUTION

Accepted Solutions
Eh2345
Frequent Visitor

I figured it out today after some more trial and error! I didn't realise earlier that I can collect the previously saved values of my edited sharepoint list row through SharePointIntegration. So, all I had to do was enter the following into the DefaultSelectedItems for ComboBox1: 

Distinct(Filter(Main;ID = SharePointIntegration.Selected.ID);Company)

 

Now all other dropdowns and ComboBoxes that depend on the selected value of ComboBox1 are populated correctly,so if I edit some other value they won't be reset to blank. Added bonus is that the user will see all previously saved values for the entry fields on row edit.

View solution in original post

1 REPLY 1
Eh2345
Frequent Visitor

I figured it out today after some more trial and error! I didn't realise earlier that I can collect the previously saved values of my edited sharepoint list row through SharePointIntegration. So, all I had to do was enter the following into the DefaultSelectedItems for ComboBox1: 

Distinct(Filter(Main;ID = SharePointIntegration.Selected.ID);Company)

 

Now all other dropdowns and ComboBoxes that depend on the selected value of ComboBox1 are populated correctly,so if I edit some other value they won't be reset to blank. Added bonus is that the user will see all previously saved values for the entry fields on row edit.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,496)