How to split and store the substrings in multiple objects

0
Hi All, I have to split(separated by semicolon) single value in a CSV file to multiple vales and need to store as multiple records in a entity.  Values in a string count is dynamic.   how to implement  the  logic for creating multiple objects and set reference to the associated object for each iteration.  please below screenshot and suggest for the solution.     Thanks in Advance!! Surya
asked
2 answers
0

Hi Surya,

I would use the Excel import module to import the Excel sheet first.

Then build a loop in which you process the records containing multivalue fields using the combination:

- finding the position of the first semicolon in the string

- use substring to get the seperate value

- do this for both multivalue fields

- now you have all values available to be able to create an entity with the all seperate fields and the association

Kind regards

answered
0

Best approach is:

  1. import using the excel importer in a separated import entity which mimics the destination entity. This entity contains attribute of type string, which captures the whole string value before splitting
  2. Download (if you don’t have it already) the community commons module.
  3. After import, use a microflow to map the imported date from import entity to destination entity(s). In this microflow use the java action string split 
  4. After this java action add a loop, which processes the result of the Java action as you need it.
answered