Skip to main content

Folks,

I have a constructed attribute that is the filter i want - in the form (FieldA = 'x' AND FIELDB > y AND FIELDC between a and b) etc. I want to to return the value where this filter is both TRUE and also get where NOT TRUE.

 

I can see i could do this via writing an inline Querier - but this means i need to update the Filter to its inverse to handle the NOT TRUE part.

Is there any way i can hand an attribute to a tester or TestFilter as the argument - so i can get both sets?

 

I know i could rebuild the logic of the Filter WITHIN a testfilter- but i already have the filter built and its quite complicated logic. Better if i could just run that prebuilt logic in a TestFilter.

 

Of course you can.

Here is an example of how you can configure Tester for your situation.

TesterYou can retrieve the output both from the Passed port and from the Failed port


Of course you can.

Here is an example of how you can configure Tester for your situation.

TesterYou can retrieve the output both from the Passed port and from the Failed port

Ah, yes I can see its not quite clear. I have one field that is already a composite Filter So the Field Called Query_String has a piece of text that reads "FieldA = x AND FieldB>y" etc etc - this has been dynamically generated and what i want is a TESTERFILTER that lets me just specify Query_String as the logic -like a complex expression -and will test that - instead of trying to reconstruct the filter logic within AND/ OR statements in the Tester. Probably just better off doing within an inlinequerier i suspect.


I do a similar thing with dynamically created sql queries using the SQLExecutor as they run against a PostgreSQL database. You should be able to do it with the InlineQuerier for data that isn't in a database, I can't think of any way to do it with Testers or TestFilters.

To get results that fail the sql I use "select count(*) where ..." in the sql so that if nothing matches I still get a record out with a count of 0.


Reply