Start a new topic

How to concatenate properties and/or attributes of a SystemWeaver object or list of objects

+ Operator can be used to merge object (i.e., Item, Part and Node) properties and/or attributes into a string. This is applicable for both a single object or a list of objects. For list, the Select operation can be used with multiple arguments. In addition to that, Join method can be compiled to convert a list of strings to a string with a given delimiter.


Here is some examples:


Example # 1- merge name, version and handle of a single item:

Path Query: Name + Version + Handle

Result: Function specification(1)x040000000009F605


Example # 2- merge name, version and handle of a single item with a comma separator:

Path Query: Name + ','+ Version +' ,'+ Handle

Result: Function specification,(1) ,x040000000009F605


Example #3- merge name, version and handle for a list of items using Select operation with multiple arguments:

Path Query: /ITSR.Select(Name + ','+ Version +' ,'+ Handle)

Result: [Req1,(1) ,x040000000009F607, Req2,(1) ,x040000000009F60B, Req3,(1) ,x040000000009F60F]


Example # 4- merge name, version and handle for a list of items with a semicolon separator (using Join method):

Path Query: /ITSR.Select(Name + ','+ Version +' ,'+ Handle).Join('; ')

Result:  Req1,(1) ,x040000000009F607; Req2,(1) ,x040000000009F60B; Req3,(1) ,x040000000009F60F

Example # 5- merge name and attribute (Req-ID) of an item with a semicolon separator :

Path Query: /ITSR.Select(Name + ',id: ' + @IDTEST).Join('; ')

Result:Req1,id: AB-4573; Req2,id: AB-4574; Req3,id: AB-4575


1 person has this question
Login to post a comment