Pre-filter next clause in Query-widget

802
2
Jump to solution
08-27-2021 09:16 AM
Labels (1)
by Anonymous User
Not applicable

Hello, 

I have multiple query's with multiple clauses to filter records. In the same query I would want to pre-filter the next clauses in the same filter. 

For example in this instance: if I select one bachelor program, I only want to filter the teachers that teach that program and not other teachers. 

Is that possible?

0 Kudos
1 Solution

Accepted Solutions
TonghuiMing
Esri Regular Contributor

Hi @Anonymous User - in SQL Expression Builder, we support various logics when it comes to the clause relationship. If you want to filter the next clause by the previous one(s), use the "Values filtered by previous expressions" feature in the "Ask for value" setting panel for unique values:

SQL.png

By configuring like that, you can see the following behavior of only the USA cities in MI being displayed in the dropdown list, which is filtered by the previously chosen value in the US State clause:

SQL2.png

View solution in original post

2 Replies
TonghuiMing
Esri Regular Contributor

Hi @Anonymous User - in SQL Expression Builder, we support various logics when it comes to the clause relationship. If you want to filter the next clause by the previous one(s), use the "Values filtered by previous expressions" feature in the "Ask for value" setting panel for unique values:

SQL.png

By configuring like that, you can see the following behavior of only the USA cities in MI being displayed in the dropdown list, which is filtered by the previously chosen value in the US State clause:

SQL2.png

by Anonymous User
Not applicable

Hello TonghuiMing, 

Ofcourse, I thought I have seen the option when I was looking at all the different options, but could not find it anymore. Thank you very much!

Kind regards, 

Geert