Indicator Widget filter Data based on attribute

462
2
Jump to solution
08-22-2022 07:23 AM
Labels (1)
DoZ
by
New Contributor III

Hello Everyone,

I have a very baisc question but it seems not to work by me.

I have a feature with 2 fields with postcode data:

AGS_Schule = the postcode where the school is located (STRING)

AGS_herkunft = the postcode of origin of the students that attend this school (STRING)

 

I want to filter the featureset in order to have ONLY those students Postcodes which are different form the Postcode of origin.

In fact the exact contrary of this:

DoZ_0-1661177315604.png

The indicator can read this conditon and brings the data where the 2 AGS Postcodes are identical:

DoZ_3-1661177787822.png

 

But when I write var fs_filt = Filter(fs, 'AGS_Schule != AGS_Herkunft') I do not get a usable FeatureSet, or at least it seems to be empty. And I am sure there are 200 records that meet this condition.

DoZ_1-1661177632459.png

The indicator cannot read this expression: 

DoZ_2-1661177722366.png

What am I missing? I also tried to return the output as:

return Featureset(Text(fs_filt))

But didn´t work at all.

Thank you in advance for your help!

0 Kudos
1 Solution

Accepted Solutions
JohannesLindner
MVP Frequent Contributor

Filter() uses a SQL expression. In SQL, the test for unequal is "<>".

var fs_filt = Filter(fs, 'AGS_Schule <> AGS_Herkunft')

Have a great day!
Johannes

View solution in original post

2 Replies
JohannesLindner
MVP Frequent Contributor

Filter() uses a SQL expression. In SQL, the test for unequal is "<>".

var fs_filt = Filter(fs, 'AGS_Schule <> AGS_Herkunft')

Have a great day!
Johannes
DoZ
by
New Contributor III

Hello Johannes.....

well, thank you! It worked!

I clearly missed that lesson! 

DoZ_3-1661237308291.png

 

 
 

 

0 Kudos