Skip to main content
Question

Test based on attribute operator included

  • November 17, 2019
  • 7 replies
  • 60 views

alc33
Contributor
Forum|alt.badge.img+10
  • Contributor

Hi!

I have 2 attributes, one with the value to test and one with the test.

I would like to do an automatic test based on this 2 attributes in order to keep or not entities.

I tried expression evaluator and attribute validator but I don't find the good syntax.

Indeed, on my second attribute I could have a mathematical test like ">50" or a range like "[50-60]".

It work for ">50" on expression evaluator but I don't suceed with the range.

Do you have an idea?

Thanks!

7 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • November 17, 2019

The range attribute needs to be structured like

(50,60or [50,60]

to work with the In range operator.

Square brackets indicate can be equal to as well as greater than/less than


alc33
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • November 18, 2019

thanks for your answer,

I tried on expression evaluator but the result is <null>.

On my screenshot, @Value(test) = [50,60].

 


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • November 18, 2019
alc33 wrote:

thanks for your answer,

I tried on expression evaluator but the result is <null>.

On my screenshot, @Value(test) = [50,60].

 

I missed that you were trying to do this in an Expression Evaluator, you need a tester


alc33
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • November 19, 2019
ebygomm wrote:

I missed that you were trying to do this in an Expression Evaluator, you need a tester

the problem is the test can be a range or a mathematical test (>50 for example).

so I would like to put the complete test on the 2nd attribute. ex :

attribute 1 : value to test

attribute 2 : test : ">50" , "in range [50,60]", etc.

so I would like to write on the Expression Evaluator : "@Value(attribute 1)@Value(attribute 2)". but it work only with the mathematical test...

so I can't use testfilter...


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • November 19, 2019
alc33 wrote:

the problem is the test can be a range or a mathematical test (>50 for example).

so I would like to put the complete test on the 2nd attribute. ex :

attribute 1 : value to test

attribute 2 : test : ">50" , "in range [50,60]", etc.

so I would like to write on the Expression Evaluator : "@Value(attribute 1)@Value(attribute 2)". but it work only with the mathematical test...

so I can't use testfilter...

In Range isn't a math operator that you can use in the expressionevaluator


alc33
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • November 20, 2019
ebygomm wrote:

In Range isn't a math operator that you can use in the expressionevaluator

That explain why I don't succeed :)

So I get round the problem. With a tester I separate the value with a range from the others. If I have a range, I transform the brackets on < or > on the field and I use a specific syntax on expression evaluator.

Thanks!


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • November 20, 2019
alc33 wrote:

That explain why I don't succeed :)

So I get round the problem. With a tester I separate the value with a range from the others. If I have a range, I transform the brackets on < or > on the field and I use a specific syntax on expression evaluator.

Thanks!

I was going to suggest using a conditional statement in an attribute creator one step prior which could be used to create a correctly formatted statement

So create an expression depending on the value in test


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