cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LOGiT
Level: Powered On

Filter one DataCardValue field based on another DataCardValue field - both dropdowns

Hi,

I have a powerapp app that I'm attempting to add a new record to insert into a Sharepoint list (Assets).

 

I want the 'Component' field to have the dropdown list restricted by the value selected in the 'Component Class' dropdown. I was hoping to do this using the Component_1 datasource (renamed from sharepoint list Component) which contains each Component and its respective Component Class, as shown:

Component.JPG

The 'Component' field (datacardvalue12) has the Item set to Choices(Assets.Component)

 

Here is a screenshot with my best attempt to filter it:

DataCardValue Filter not working.JPG

Every attempt to filter has resulted in no values in the dropdown list at all.

 

Can someone please help me?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter one DataCardValue field based on another DataCardValue field - both dropdowns

Hi @LOGiT,

Could you please share a bit more about the 'Component Name' column and 'Component Class' column in your Component_1 data source?

Is the "Component Class" column a Choice type column?

Based on the screenshot that you provided, I suppose that the "Component Class" column is a Choice type column, is it true?

I think your issue may be related to the Delegation issue within your Filter formula. I have made a test on my side, please take a try with the following workaround:

Set the OnVisible property of the first screen of your app to following:

ClearCollect(ComponentCollection, Component_1) /* <-- Save your Component_1 records into a Collection */

Set the Items property of the Combo Box control within the Component Data card to following:

Filter(
      Choices(Assets.Component),
      Value in Filter(ComponentCollection, 'Component Class'.Value = DataCardValue11.Selected.Value).Title
)

Best regards,

Kris

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.
1 REPLY 1
Community Support Team
Community Support Team

Re: Filter one DataCardValue field based on another DataCardValue field - both dropdowns

Hi @LOGiT,

Could you please share a bit more about the 'Component Name' column and 'Component Class' column in your Component_1 data source?

Is the "Component Class" column a Choice type column?

Based on the screenshot that you provided, I suppose that the "Component Class" column is a Choice type column, is it true?

I think your issue may be related to the Delegation issue within your Filter formula. I have made a test on my side, please take a try with the following workaround:

Set the OnVisible property of the first screen of your app to following:

ClearCollect(ComponentCollection, Component_1) /* <-- Save your Component_1 records into a Collection */

Set the Items property of the Combo Box control within the Component Data card to following:

Filter(
      Choices(Assets.Component),
      Value in Filter(ComponentCollection, 'Component Class'.Value = DataCardValue11.Selected.Value).Title
)

Best regards,

Kris

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.