Skip to main content

My Feature Type has several attributes (eg. a, b, c, and s). One of them (e.g. s) is special , it contains the name (string) of one of the other attributes.

Now I would like to test my features. I would like to use the string value content from this special attribute s (which for example is 'b') in order to define the left value attribute for my test, for example: @Value(b).

Any hints for that are very welcome! Many thanks!

@frantsch​ If I understand you correctly, you should be able to use AttributeCreator:

dialog


This would create a new attribute named according to the string value contained in attribute s, to stick with the above example. Which is the name of one of the other existing attributes (a, b or c). So the newly created attribute would then be a copy of an existing attribute with the same name, right?

I am afraid this is not what I need. I only want to test one of the existing attributes (a, b, or c) against any criteria. The string value in attribute s only decides, which attribute a, b, or c is the one to be tested.


I have created an example workspace 'parameterize_tested_attribute.fmw' to illustrate my problem.

The published parameter called s contains the name one of the three attributes a, b, or c as string value.

My question is:

How am I to set the Tester transformer left value, so that it will use the string value from the published parameter s (which is fetched into an additional attribute called _s) to test the corresponding attribute named a, b, or c against the criteria < 0.5.


@frantsch​  OK I see. Thanks for the workspace. You can use either:

@Value($(s))

or

@Value(@Value(_s))

I've attached your workspace with the changes.


In my case, it works perfect with @Value(@Value(_s))! Many thanks! This is something one should definitely know!

Regards,

Bernd


Reply