cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PhilippeJ
Regular Visitor

Cascading dropdown reseting data when saved on edit

Hello all,

I have a powerapp form on a sharepoint list and I experience a problem with cascading dropdown field on my form.

I have two cascading dropdown on the form, one for "Site" and the other for "Department".

In new form, everything is working fine and the data is saved on sharepoint list when item is submitted.

When I edit an Item, the data is populated in each field, but when I save, the "Department" field is cleared and the data from it is removed from the list.

Here is my update formula :

 

{
Id: LookUp('Departments list'; Title = DataCardValue5_1.Selected.Title; ID);
Value: DataCardValue5_1.Selected.Title
}

 

Thanks for your help. 

 

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @PhilippeJ ,

Try this

(
   {
      '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
      Id: LookUp('Departments list'; Title = DataCardValue5_1.Selected.Title; ID);
      Value: DataCardValue5_1.Selected.Title
   }
)

I cannot see your data, so cannot confirm the Id lookup validity - I assume the lookup target is 'Departments List'

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi Warren, thanks for your reply.

I tried with you formula but it still doesn't work. To be more precise, I have to add that when i edit the item, i don't touch the department field, i modify another field and when i save, the department field is cleared. Also, if i want to change the department, i need to deselect site and select it again because the data previously entered is populated in the site field but no choice are accessible in the department field. When i select site again, i can choose the department.

Thanks for your help, and tell me if you need more info or screenshots.

Have a nice day.

Philippe.

Hi @PhilippeJ ,

To be clear on your requirements, you are updating the Department field which is a Choice field in SharePoint and the Update property of the DataCard I supplied does not update the field when the form is saved with SubmitForm() command?

I will be offline shortly due to time zone, but will pick up your response in the morning.

Hi @PhilippeJ ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi Warren,

Sorry i was offline due to internet problems.

Again, thanks for your help.

No, my problem is not when i edit the department field, my problem is when i edit any other field in the item without touching the department field, it clears the department field and it save a blank record for this field on my SharePoint list.

Also, if i want to reselect it when i edit the item again (after it cleared the field and saved it as blank), i need to clear the site field and select a site again otherwhise it won't give me any choice in the demartment field (it's a cascading dropdown with site field as parent).

Sorry if i'm not clear but it's quite weird .

Have a nice day.

Philippe.

 

Hi @PhilippeJ ,

Sorry I missed you post - if you tag me in your response, it is much easier to see in my feed.

Two questions

  • Does Department update successfully when you change it to another value?
  • It there always a value in this control when you change another field?

Hi @PhilippeJ ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,040)