6525036 Super Contributor.
Super Contributor.
431 views

copy multi valued attribute to another object

Jump to solution

Hi everyone,

Oh man, this new forum is confusing. I hope this is the right place to ask.

I wonder if anybody has a good idea about how I can copy a multi valued attribute from one object, to another multi valued attribute on onother object.

My experience is, that just setting the src attr on the second object to the src attr from the first object, just gives the first value in the multi valued attribute.

 

 

Labels (1)
0 Likes
1 Solution

Accepted Solutions
Knowledge Partner
Knowledge Partner

Re: copy multi valued attribute to another object

Jump to solution
Yes, looping over it should work fine.

View solution in original post

0 Likes
5 Replies
Knowledge Partner
Knowledge Partner

Re: copy multi valued attribute to another object

Jump to solution
It should work to set it as long as you specify it as a nodeset if I remember correctly.

Otherwhise you need to loop over it with a for each and add all values one by one.
0 Likes
6525036 Super Contributor.
Super Contributor.

Re: copy multi valued attribute to another object

Jump to solution

Thanks

Since the value type can only be specified as dn, string, integer etc, there is not an option to specify that the source attribute value should be a node set (when setting it).

So looping must be it,

First clearing the attribute, and then adding values one by one.

 

0 Likes
Knowledge Partner
Knowledge Partner

Re: copy multi valued attribute to another object

Jump to solution
Yes, looping over it should work fine.

View solution in original post

0 Likes
Knowledge Partner
Knowledge Partner

Re: copy multi valued attribute to another object

Jump to solution

By nodeset, he meant use a variable, which is a nodeset, for the value to copy.  Not the type, not the attribute.

 

0 Likes
6525036 Super Contributor.
Super Contributor.

Re: copy multi valued attribute to another object

Jump to solution

I did try that, and failed miserably.
I ended up looping.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.