Skip to main content
Solved

Conditional values and Group by

  • February 26, 2018
  • 3 replies
  • 212 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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

jdh
Contributor
Forum|alt.badge.img+40
  • 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+23
  • 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

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