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

Re: Cascading dropdown reseting data when saved on edit

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.

Highlighted
Regular Visitor

Re: Cascading dropdown reseting data when saved on edit

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.

Highlighted
Super User III
Super User III

Re: Cascading dropdown reseting data when saved on edit

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.

Highlighted
Super User III
Super User III

Re: Cascading dropdown reseting data when saved on edit

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.

Highlighted
Regular Visitor

Re: Cascading dropdown reseting data when saved on edit

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.

 

Highlighted
Super User III
Super User III

Re: Cascading dropdown reseting data when saved on edit

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?
Highlighted
Super User III
Super User III

Re: Cascading dropdown reseting data when saved on edit

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,675)