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

Filter Data based on selected value in Option set



I have option set field on one screen based on the value selected in option set I want to filter data in gallery in other screen.


Screenshot of Logic:


Screenshot of Error:



Thanks in Advance

Community Support Team
Community Support Team

Re: Filter Data based on selected value in Option set

Hi @vaishalivyas1,


Could you please share more details about which control you are working with?

I suspect here you are working with the Gallery2 control, if this is the case, then the formula should be changed in the following way:

if(DataCardValue5.Selected.OptionValue = 100000000, 
   SortByColumn(filter('Project Task Billing Codes', 
statecode=0 && _cf_projecttaskid_value= Gallery2_1.Selected.cf_projecttaskid),
"cf_name"), SortByColumns(Filter('Project Task Billing Codes',
_cf_projecttaskid_value= Gallery2_1.Selected.cf_projecttaskid),
"cf_name") )

The Error should be caused by refering the own value of the gallery control, and this is not supported.

A control can't have its own items property refering to its own property value.




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Filter Data based on selected value in Option set

Hi @v-micsh-msft


In Gallery2 I have Project Task and in Gallery2_1 I have Project case. based on value selected in option set on EditScreen1 I want filtered results on Gallery 3. 


Level: Powered On

Re: Filter Data based on selected value in Option set

I have had similar problems when passing a variable from screen 1 to screen 3 (by using a intermediate screen 2).

I learned to never selfassign any variables: for example don't use -> varExtern : varExtern


Try to use it as follows:

Screen1 : Navigate(Screen2;Fade;{varExtern : 'my assigned variable'})

Screen2 : Navigate(Screen3;Fade;{varExternal : varExtern})

Screen3 : here you can use varExternal

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.


PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 78 members 4,426 guests
Please welcome our newest community members: