How to allocate dynamic values from document list to a various string attributes.


I have a document list with two fields (Name, attribute). I wanted to allocate the values dynamically to the string attributes from the document list.

Is it possible to achieve the above task.

Thanks in Advance.


I understand your question like this…

Your getting values in document list, In runtime according to the input values you want map values from document list to string right?

In case above is the question…do the following

Loop \DocumentList
Branch \Value (use switch)
map on label(case)

Let me know about your question more detail,if your requirement is different?


use the below in code and achieve the functionality

pub.math:randomDouble(give fraction input depending on document list size if below 10 give 1 between 10 and 100 give 2 and so on)
pub.math:multiplyFloats(multiply with 10 if doc list size below 10 if doc size between 10 and 100 multiply with 100 and so on)
pub.math:toNUmber(convert into java.lang.Integer)

use the number as indices for document list and map to string attributes

Hope you understand this logic use the above three services and generate a random integer and use it as index