Skip to main content

Hi all,

I'd like to know if there is a way to use conditional value mechanism with a group by parameter.

Imagine following case:

I have a published parameter with values 0 and 1. My features have the attributes A, B, C and D. When I select 0 for the published parameter I'd like to have A and B attributes as Group by attributes, and when 1 is given, C and D shall be set.

I know that I could use a tester and route features accordingly to differently set transformers, but I'm using the Group by setting on various locations. To keep the workspace readable this approach would not be applicable.

I would use a conditional attributeCreator to create a new attribute that is a combination of the relevant attributes depending on the parameter choice, and then use the new attribute as the group by for all transformers.


You can test on the published parameter in the conditional values.

Like this:


I would use a conditional attributeCreator to create a new attribute that is a combination of the relevant attributes depending on the parameter choice, and then use the new attribute as the group by for all transformers.

You're absolutely right, I was thinking way too complicated! It's the value that counts during "Group By" not the attribute name! Thanks for your support

 

 


Reply