Is it possible to convert d:text field of used custom data model to multiple values?
I know that it is not possible to do in straight way, but may be there is a complex procedure.
Alfresco Community (Build: 201612)
Solved! Go to Solution.
Sure, this should not be too hard. Assuming you have a property called custom:someProp, edit your model to add a new property called custom:somePropMulti (or whatever you want, but obviously it has to be unique).
Now write a script to read the values from custom:someProp and write them to custom:somePropMulti. The easiest way to do this is probably with the Alfresco JavaScript Console but you could do this with any programming language you are comfortable with. For example, you could use Java or Groovy and connect via the Apache Chemistry OpenCMIS client. Or do with with Python and cmislib, etc.
Sure, this should not be too hard. Assuming you have a property called custom:someProp, edit your model to add a new property called custom:somePropMulti (or whatever you want, but obviously it has to be unique).
Now write a script to read the values from custom:someProp and write them to custom:somePropMulti. The easiest way to do this is probably with the Alfresco JavaScript Console but you could do this with any programming language you are comfortable with. For example, you could use Java or Groovy and connect via the Apache Chemistry OpenCMIS client. Or do with with Python and cmislib, etc.
I am just in doubt if I have a custom model with about twenty fields and I want to convert a few of them to multi value fields, the above method will result in significant increase of fields quantity.
And moreover a few of fields will remain unused after such a conversion.
But if this is the only possible solution I use it.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.