Skip to main content
Solved

Conditional values and Group by

  • February 26, 2018
  • 3 replies
  • 179 views

whkarto
Contributor
Forum|alt.badge.img+14

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.

Best answer by jdh

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.

View original
Did this help you find an answer to your question?

3 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • Best Answer
  • February 26, 2018

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.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • February 26, 2018

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

Like this:


whkarto
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • February 27, 2018
jdh wrote:

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

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings