In this scenario, the source data has some attributes with names following a common pattern. e.g. test (a), test (b), test (c), etc.
We want to use all of these attributes on the left side of some test clause (in TestFilter). Instead of manually selecting every attribute, is it possible to use a formula to represent test (a), test (b), test (c)? We do have an attribute "name", whose values are a, b, c, etc. Also, the right side of the test clause can be set with the same expression, for all of these attributes.
Any suggestions would be much appreciated!
Best answer by xiaomengatsafe
After some testing, I realized there is a GUI bug in play that caused some confusion. We can easily use Text Editor to formulate the attribute names as such: @Value(test (@Value(name)))
And using it on the Left Value of a test Clauses works. However the Test Conditions GUI shows this as invalid (red). But the workspace runs fine, and produces expected result. I'll report this as a bug, with our developers.
Attached is a sample workspace to demonstrate what was the scenario, and how the testFilter was set up to get the result. formulate-attributename-with-values.fmw
please take a look at the attached workspace: it won't eliminate 'selecting each attribute' completely, but will help avoiding retyping the same condition/expression again and again.
There are two scenarios in the workspace:
_a > 10 AND _b > 10 AND _c > 10 AND _d > 10 AND _e > 10
and
_a > 10 OR _b > 10 OR _c > 10 OR _d > 10 OR _e > 10
We might be able to construct more complex conditions.
After some testing, I realized there is a GUI bug in play that caused some confusion. We can easily use Text Editor to formulate the attribute names as such: @Value(test (@Value(name)))
And using it on the Left Value of a test Clauses works. However the Test Conditions GUI shows this as invalid (red). But the workspace runs fine, and produces expected result. I'll report this as a bug, with our developers.
Attached is a sample workspace to demonstrate what was the scenario, and how the testFilter was set up to get the result. formulate-attributename-with-values.fmw
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.