Subform Zoho Form to Creator

Subform Zoho Form to Creator

Hi,

I would like to be able to retrieve the values ​​of a Zoho Form subform to create an entry for each in Zoho Creator. To send from Form to Creator, I use Zoho Flow.

I have a custom function, which should normally retrieve each field value then create an entry in Creator for each entry in the subform, but it doesn't work.

Zoho Form output data :

  1. {
  2.    MODIFIED_USER : "mymail",
  3.    ADDED_TIME : "03-Feb-2025 08:16:33",
  4.    SubForm : [
  5.       {
  6.          FileUpload4 : [
  7.             {
  8.                path : "myurl/1738588577854_Logo_noir_2024.png",
  9.                extension : "png",
  10.                name : "Logo_noir_2024.png"
  11.             }
  12.          ],
  13.          SingleLine1 : "Test entrée 1 num cab",
  14.          MultiLine2 : "Test entrée 1 dec",
  15.          Dropdown3 : "Oui",
  16.          Dropdown2 : "A COMMANDER",
  17.          MultiLine3 : "",
  18.          Dropdown1 : "",
  19.          SingleLine : ""
  20.       },
  21.       {
  22.          FileUpload4 : [
  23.             {
  24.                path : "myurl/1738588591305_Logo_noir_2024.png",
  25.                extension : "png",
  26.                name : "Logo_noir_2024.png"
  27.             },
  28.             {
  29.                path : "myurl/1738588591355_logo_zoho-books.xcf",
  30.                extension : "xcf",
  31.                name : "logo_zoho-books.xcf"
  32.             }
  33.          ],
  34.          SingleLine1 : "Test entrée 2 num cab",
  35.          MultiLine2 : "Test entrée 2 dec",
  36.          Dropdown3 : "Non",
  37.          Dropdown2 : "A FAIRE",
  38.          MultiLine3 : "",
  39.          Dropdown1 : "",
  40.          SingleLine : ""
  41.       }
  42.    ],
  43.    form_id : "TestMaxRapportinstallation",
  44.    ADDED_TIME_ISO8601 : "2025-02-03T08:16:33.000-05:00",
  45.    IP_ADDRESS : "142.169.198.208",
  46.    DecisionBox : "true",
  47.    REFERRER_NAME : "myurl/form/TestMaxRapportinstallation/thankyou"
  48. }

Custom function Flow input :

  1. {
  2.    inputForm : [
  3.       {
  4.          FileUpload4 : [
  5.             {
  6.                path : "myurl/1738588577854_Logo_noir_2024.png",
  7.                extension : "png",
  8.                name : "Logo_noir_2024.png"
  9.             }
  10.          ],
  11.          SingleLine1 : "Test entrée 1 num cab",
  12.          MultiLine2 : "Test entrée 1 dec",
  13.          Dropdown3 : "Oui",
  14.          Dropdown2 : "A COMMANDER",
  15.          MultiLine3 : "",
  16.          Dropdown1 : "",
  17.          SingleLine : ""
  18.       },
  19.       {
  20.          FileUpload4 : [
  21.             {
  22.                path : "myurl/1738588591305_Logo_noir_2024.png",
  23.                extension : "png",
  24.                name : "Logo_noir_2024.png"
  25.             },
  26.             {
  27.                path : "myurl/1738588591355_logo_zoho-books.xcf",
  28.                extension : "xcf",
  29.                name : "logo_zoho-books.xcf"
  30.             }
  31.          ],
  32.          SingleLine1 : "Test entrée 2 num cab",
  33.          MultiLine2 : "Test entrée 2 dec",
  34.          Dropdown3 : "Non",
  35.          Dropdown2 : "A FAIRE",
  36.          MultiLine3 : "",
  37.          Dropdown1 : "",
  38.          SingleLine : ""
  39.       }
  40.    ]
  41. }

  42. Custom function Zoho Flow output :

  43. {
  44.    subFormToCreator_1 : [

  45.    ]
  46. }

Creator record input :

  1. {
  2.    Form : "Test_Forms",
  3.    Multi Line : "",
  4.    Single Line : "",
  5.    Application : "maxtest"
  6. }

Creator record output :

  1. {
  2.    projet : "",
  3.    numcab : "",
  4.    description : "",
  5.    ID : "4535260000000936003",
  6.    status : [

  7.    ],
  8.    resolved : ""
  9. }

My custom function in Flow :

  1. list SubFormToCreator(string inputForm)
  2. {
  3. formData = inputForm;
  4. subFormEntries = List();
  5. if(formData.containsKey("SubForm"))
  6. {
  7. for each  entry in formData.get("SubForm")
  8. {
  9. info entry;
  10. entryData = Map();
  11. // Extraire les données nécessaires
  12. entryData.put("FileUpload4",entry.get("FileUpload4"));
  13. entryData.put("SingleLine1",entry.get("SingleLine1"));
  14. entryData.put("MultiLine2",entry.get("MultiLine2"));
  15. entryData.put("Dropdown3",entry.get("Dropdown3"));
  16. entryData.put("Dropdown2",entry.get("Dropdown2"));
  17. entryData.put("MultiLine3",entry.get("MultiLine3"));
  18. entryData.put("Dropdown1",entry.get("Dropdown1"));
  19. entryData.put("SingleLine",entry.get("SingleLine"));
  20. // Ajouter l'entrée à la liste
  21. subFormEntries.add(entryData);
  22. }
  23. }
  24. return subFormEntries;
  25. }


Do you have a function that is already working, or help me find where the problem is coming from?

Thanks for your help!