web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cascading dropdown sel...
Power Apps
Answered

Cascading dropdown selection disappearing when creating a new row entry

(0) ShareShare
ReportReport
Posted on by 11

Noob here. So a copied an app and modified it to fit our needs it has the following issue:

 

In the app there are a few dropdowns, which values are sourced from SharePoint Lists, where the last dropdown (Job) options cascade from the selection of the first dropdown (Client).

 

So I populate the dropdowns, and other text entries. See below:

1.png

 When I select the new row button the last dropdown select disappears. See below:

2.png

 

For the data section of the (Job) dropdown I have the following:

4.png

 

And for the new grouping this is the On Select Code:

 

 

Select(Parent);
Patch(
 newTimeEntry,
 ThisItem,
 {
 Employee: {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Claims: "i:0#.f|membership|" & currentUser.Email,
 Department: "",
 DisplayName: currentUser.FullName,
 Email: currentUser.Email,
 JobTitle: "",
 Picture: ""
 },
 Client: {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Id: cbClient.Selected.ID,
 Value: cbClient.Selected.Title
 },
 Service: {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Id: cbService.Selected.ID,
 Value: cbService.Selected.Title
 },
 Job: {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Id: cbJob.Selected.ID,
 Value: cbJob.Selected.Title
 },
 Mon: Value(tbMon.Text),
 Tues: Value(tbTues.Text),
 Weds: Value(tbWed.Text),
 Thurs: Value(tbThurs.Text),
 Fri: Value(tbFri.Text),
 Sat: Value(tbSat.Text),
 Sun: Value(tbSun.Text),
 Comments: tbComments.Text
 }
);
Collect(
 newTimeEntry,
 {
 Employee: {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
 Claims: "i:0#.f|membership|" & currentUser.Email,
 Department: "",
 DisplayName: currentUser.FullName,
 Email: currentUser.Email,
 JobTitle: "",
 Picture: ""
 },
 Client:Blank(),
 Service:Blank(),
 Job:Blank(),
 Mon: 0,
 Tues: 0,
 Weds: 0,
 Thurs: 0,
 Fri: 0,
 Sat: 0,
 Sun: 0,
 Comments: ""
 })

 

 

Any help would be appreciated. Thanks!

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @JohnIntel ,

     

    Apparently you have failed to save the Job Dropdown value into the collection, since the Items of the dropdown is set to Filter(Job, Title = cbClient.Selected.Title) which I cannot understand( Job list title equals to client title), this is not a cascading dropdown. When 

     

    Could you please share more details about the App? What's the structure of those SP lists that populated in the dropdowns? Is the Job column a LookUp column? 

     

    Assuming the Job column is LookUp type, then if you would like to setup a cascading dropdown of jobs, you will need to use the Distinct function:

     

    Distinct(Filter(Job, Title = cbClient.Selected.Title), Job.Value).Result

     

     

    Then on the add new row button, you need do some modification:

     

    Patch(
     newTimeEntry,
     ThisItem,
     {
     Employee: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & currentUser.Email,
     Department: "",
     DisplayName: currentUser.FullName,
     Email: currentUser.Email,
     JobTitle: "",
     Picture: ""
     },
     Client: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: cbClient.Selected.ID,
     Value: cbClient.Selected.Title
     },
     Service: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: cbService.Selected.ID,
     Value: cbService.Selected.Title
     },
     Job: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: LookUp(Choices(Job.Job),Value = cbJob.Selected.Result).ID,
     Value: LookUp(Choices(Job.Job),Value = cbJob.Selected.Result).Value
     },
     Mon: Value(tbMon.Text),
     Tues: Value(tbTues.Text),
     Weds: Value(tbWed.Text),
     Thurs: Value(tbThurs.Text),
     Fri: Value(tbFri.Text),
     Sat: Value(tbSat.Text),
     Sun: Value(tbSun.Text),
     Comments: tbComments.Text
     }
    );
    Collect(
     newTimeEntry,
     {
     Employee: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|" & currentUser.Email,
     Department: "",
     DisplayName: currentUser.FullName,
     Email: currentUser.Email,
     JobTitle: "",
     Picture: ""
     },
     Client:Blank(),
     Service:Blank(),
     Job:Blank(),
     Mon: 0,
     Tues: 0,
     Weds: 0,
     Thurs: 0,
     Fri: 0,
     Sat: 0,
     Sun: 0,
     Comments: ""
     })

     

     

    I suspect that there would still be some error because of missing information of the scenario, please feel free to let me know and better provide more details.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • JohnIntel Profile Picture
    11 on at

    Thanks for the feedback @v-jefferni .

     

    Everything works* with this app with the exception of the one dropdown going blank when a user adds a row. If the user updates the dropdown (labeled "Job" above it)  selection after they add another row everything saves as expected to the SharePoint lists.

     

    Also, the selection options change in the dropdown (labeled "Job" above it) in relation to the "Client" labeled dropdown.

     

    *I just realize the dropdown choice of "Job" is populating the SP list with the Title field (same value as "Client" as opposed to the "Job" Value selected in the cascading drop down. Ugh!

     

    The App is a timesheets tool. The drop downs pull form standard SharePoint lists. The first 2 pull from the standard "Title" Column in the list. The 3rd, the cascading one labeled "Job" matches:

    2021_04_22_11_38_14_.png

     

    The Job SP list is standard:

    2021_04_22_11_45_51_Automation2_Job_All_Items.png

     

     

    I tried adding to the new row:

     

     

     

    Job: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: LookUp(Choices(Job.Job),Value = cbJob.Selected.Result).ID,
     Value: LookUp(Choices(Job.Job),Value = cbJob.Selected.Result).Value

     

     

     

    And this error came up:

    2021_04_22_09_05_00_Window.png

     

    It seems I need the drop down to remember a row # ID as opposed to the actual value.

     

    Also, when I change

     

     

    Filter(Job, Title = cbClient.Selected.Title)

     

     

    to:

     

     

    Distinct(Filter(Job, Title = cbClient.Selected.Title), Job.Value).Result

     

     

     

    I get theses errors:

    2021_04_22_09_28_39_Timesheet_V5_Coding_Saved_Unpublished_Power_Apps.png

    2021_04_22_09_29_31_.png

     

    Thank you,

    John

  • Verified answer
    JohnIntel Profile Picture
    11 on at

    @v-jefferni 

     

    I solved the value disappearing (And the list updating in SP. I just had to change the lookup column to "Job" from "Title" :))

     

    I solved the disappearing value by changing Title to Job.

     

    Original code:

     

     Job: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: cbJob.Selected.ID,
     Value: cbJob.Selected.Title
     },

     

    to now working (not disappearing):

     

     

     Job: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id: cbJob.Selected.ID,
     Value: cbJob.Selected.Job
     },

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard