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

Cascading Drop-Down Result not saving

Hi,

 

I hope someone can help me out here. I have a Cascading Drop Down which references a separate data source, filters the records, returns a result and allows the selection of multiple items. It all seems to work perfectly. Unfortunately, when I save the record, it refuses to save the field. All other fields are saved correctly. The formula in the 'Items' variable is:

 

Sort(Distinct(Filter(Schedule,'Project Name'.Value=DataCardValue1.Selected.Value,MilestoneStatus.Value="Closed"),Title),Result)

 

Schedule = other data source

'Project Name' = lookup column in other data source

DataCardValue1 = comparison field

MilestoneStatus = additional filter in other data source

 

As I say, it all works beautifully ... besides being able to save the selected items. Help!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi  @BlueJamme ,

Could you please share a bit more about your app's configuration?

Which column does the Drop down box (which your Sort formula put on) connect to? A Choice column or LookUp column?

 

Set the Items property of the Drop down box to following (that you mentioned😞

Sort(
Distinct(Filter(Schedule,'Project Name'.Value=DataCardValue1.Selected.Value,MilestoneStatus.Value="Closed"),Title),
Result
)

If the Drop down box (which your Sort formula put on) related to a Choice column, please take a try with the following workaround:

Set the Update property of the Data card which contains the Drop down box (which your Sort formula put on) to following:

{
  Value: DropdownBox.Selected.Value
}

Or

{
  Value: DropdownBox.Selected.Result
}

 

If the Drop down box (which your Sort formula put on) related to a LookUp column, please take a try with the following workaround:

Set the Update property of the Data card which contains the Drop down box (which your Sort formula put on) to following:

{
   Id: LookUp('ReferencedSPList', ReferencedColumn = DropdownBox.Selected.Value, ID),
   Value: DropdownBox.Selected.Value 
}

Note: The 'ReferencedSPList' represents the SP list which the LookUp column (DropdownBox related to) references values from. The ReferencedColumn represents the column in 'ReferencedSPList' which the LookUp column (DropdownBox related to) references values from.

Please also check and see if the responses within the following threads would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Save-Filtered-Lookup-Value-in-List-Custom-For...

 

 

Best regards,

Community Support Team _ Kris Dai
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

5 REPLIES 5
v-xida-msft
Community Support
Community Support

Hi  @BlueJamme ,

Could you please share a bit more about your app's configuration?

Which column does the Drop down box (which your Sort formula put on) connect to? A Choice column or LookUp column?

 

Set the Items property of the Drop down box to following (that you mentioned😞

Sort(
Distinct(Filter(Schedule,'Project Name'.Value=DataCardValue1.Selected.Value,MilestoneStatus.Value="Closed"),Title),
Result
)

If the Drop down box (which your Sort formula put on) related to a Choice column, please take a try with the following workaround:

Set the Update property of the Data card which contains the Drop down box (which your Sort formula put on) to following:

{
  Value: DropdownBox.Selected.Value
}

Or

{
  Value: DropdownBox.Selected.Result
}

 

If the Drop down box (which your Sort formula put on) related to a LookUp column, please take a try with the following workaround:

Set the Update property of the Data card which contains the Drop down box (which your Sort formula put on) to following:

{
   Id: LookUp('ReferencedSPList', ReferencedColumn = DropdownBox.Selected.Value, ID),
   Value: DropdownBox.Selected.Value 
}

Note: The 'ReferencedSPList' represents the SP list which the LookUp column (DropdownBox related to) references values from. The ReferencedColumn represents the column in 'ReferencedSPList' which the LookUp column (DropdownBox related to) references values from.

Please also check and see if the responses within the following threads would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Save-Filtered-Lookup-Value-in-List-Custom-For...

 

 

Best regards,

Community Support Team _ Kris Dai
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

Hi Kris,

 

Firstly, thanks ever so much! This has taken me on a step from where i was. It IS a lookup column I'm working with so that would explain why it wasn't writing back to SharePoint correctly. I amended the suggested formula slightly as it was a multiple lookup so it needed to return a 'result' rather than a 'value'.

 

The remaining issue I'm having, however, is that when the user goes back in the record to edit, the data field defaults back to empty.

 

Is there a specific amend I would need to make to the 'default' control (currently blank) to ensure that the previous selection endured?

 

Thanks for your help so far!

 

Regards

BlueJamme

... also (!), I've just received feedback that although multiple items can be selected, only a single item is saved. So perhaps not quite there yet!

Hi

 

Did you get any workaround to saving multiple items?

 

 

 

Regards,

Ashootosh

GoGorilla
Helper II
Helper II

@v-xida-msft I know this is an older thread but I am having a similar issue.  The DivisionDirector is a SharePoint lookup list where the LUDivisionsDivDir lives as a choice field.  Filter value of that field where it is equal to the LUDivisionsTypeDataCardValue then filter the Onboarding (datasource in PowerApps) SharePoint list column LUDirector where the value is in the previous filter.  All works and will update the list and my app without the Distinct function.  Once I add the Distinct function, it doesn't submit the data in the LUDirector field.  I get all of the distinct choices, it just does not update.  I have tried your solution above and it is not working.  The LUDirector field is multichoice.  Any help would be appreciated.

Distinct(Filter(Choices([@Onboarding].LUDirector),Value in Filter(DivisionDirector, LUDivisionsDivDir.Value = LUDivisionsTypeDataCardValue.Selected.Value).txtDirector),Value)

 

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 (63,038)