Jump to content

how to concatenate two properties


Recommended Posts

image.png.c79c4a8bcb0d5542d990668fe4700af0.png

For a capsule, I have two properties of my interest, "product_S", "previous_product_S". I want to concatenate these two together to be a new property called "switch". How can I do it?  

My formular looks like this:

$a3=$a1.mergeproperties($a2,"batch_S")
$a3.transform(
$cap->{
$c=add($cap.property("previous_product_S"),$cap.property("product_S"))
$cap.setProperty("switch",$c)}
)

But I only get the first part as the value of  my new property "switch".

Link to comment
Share on other sites

  • Seeq Team

Hi Baishun,

Do the capsules already have both properties or is the mergeproperties bringing the two properties together? Your formula seems to work in an example I've made so you may want to split up the different parts of the formula (e.g. output the results before the transform to ensure that looks as you'd expect).

Link to comment
Share on other sites

Hi Joe, 

Thank you for your reply, My capsules have both properties, but they are mergeproperties. I tried again with indepent properties rather than mergedproperties.

It works. So Concatenating mergeproperties to be a new property is not supported, right?  you can only get the first parameter of your fomular "Add". Is there a way to overcome this?

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...