Jump to content

$condition1 or $condition2 or $condition3 -> based on hit get property and apply to result


Go to solution Solved by Joe Reckamp,

Recommended Posts

Hello together, I´have been struggling with the following:

There are 3 conditions, each of them having the property @ the capsules 'Reactor'.

I want to bring them into one (bottom line) and based if it´s from 1,2 or 3 set the property at the result 'Reactor' to 1,2 or 3

Any ideas?

 

2.PNG

3.PNG

1.PNG

Link to comment
Share on other sites

  • Seeq Team
  • Solution

If they already have the property on the conditions, you could just do:
 

combinewith($r1tr, $r2tr, $r3tr)

If they don't already have the property, would recommend doing the setproperty in the same method as above:

combinewith($r1tr.setproperty('Reactor', '1'), $r2tr.setproperty('Reactor', '2'), $r3tr.setproperty('Reactor', '3'))

 

Link to comment
Share on other sites

Thanks a lot Joe for you fast feedback. The property is already there, but without "re"-setting them, looks like they don´t get transferred.

The second formula works like a charm. 👍

edit: was a mistake on my side when using 

combinewith($r1tr, $r2tr, $r3tr)

it also takes the capsule properties

Edited by hanskanns
update
Link to comment
Share on other sites

  • Seeq Team

To summarize the issue here for posterity: the Union/or operator does not preserve capsule properties, while combineWith() does.

If you're just trying to combine multiple conditions together, most of the time it is best to use combineWith so you don't have to use something like mergeProperties to get them back.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...