How to use String to file and string from file?

1
Can anyone help me with how to use String to file and string from file activity with real time example?
asked
1 answers
1

Hi Zia Sayyad

Previous logic of mine includes, importing an excel file for Details object.

After successfully imported the data is stored in Details object

Process for the logic string to file

  1. Download community commons from Mendix.
  2. Create a object generalised to file document. – In my case its DetailsFile, which is used to hold the file.

  1. Create a string variable. (tempVariable)
  2. Iterate the object in which the data exist and form your string. Mentioned below

 

  1. Create the object – which is used to hold the file (In my case its DetailsFile)
  2. Add member Name and provide the file name.
  3. This file name can be anything, it will reflect when you actually download the file

 

  1. Add StringToFile java action which is there in community commons and configuration look as below
  2. Value = The string variable name
  3. Destination = The object which is used to hold the file
  4. Encoding = by default its UTF_8

  1. Add download activity.
  2. This activity will the file object.

  1. Execute the flow.

 

All set to for your requirement.

Hope it helps!!!

answered