-2

I have a property tag

<property id="accountNumbers">0000111|00000222|000033</property>

I am able to read and separate using pipe but I am looking for the method to upload these values into fileNet where accountNumbers field is set to multi-value property. My guess is

doc.getProperties().putValue( accountNumbers, String.valueOf( accountNumbersSplit) );

I have created a list of those values by separating with the name accountNumbersSplit and trying to upload this list into accountNumbers field.

edit

this is how I have separated and stored in a List

String [] accountNumbersSplit = groupNumberValue.split( "\\|" ); 
List <String> accountList = Arrays.asList( accountNumbersSplit); 

this is how I am trying to upload

doc.getProperties().putValue( accountNumbers, String.valueOf( accountNumbersSplit) );
Gary
  • 13,303
  • 18
  • 49
  • 71
rsharma
  • 11
  • 2
  • 1
    You may get more help if you show what you have tried so far. – Scary Wombat Feb 07 '19 at 01:02
  • this is how i have separated and stored in a List String [] accountNumbersSplit = groupNumberValue.split( "\\|" ); List accountList = Arrays.asList( groupNumberSplit ); this is how i am trying to upload doc.getProperties().putValue( accountNumbers, String.valueOf( accountNumbersSplit) ); – rsharma Feb 07 '19 at 01:18

1 Answers1

0

If your property is a multi-value, than it's property datatype should be PropertyStringListImpl, so the value you want to set it to, has to be of datatype StringList -> Try using the StringList datatype when putting the value... also the first argument in putValue() is the name of the property (String), so is accountNumbers a String containing the correct propertyname?

StringList accountNumbersSplit;
doc.getProperties().putValue(propertyName, accountNumbersSplit);