Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.

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!

1 user has this question.
4 Replies
Reply
  • Zoho MVP
  • 9 days ago

As far as I'm aware you can't add files using the Creator integration tasks or form API, instead you would need to use the file upload API, see: https://www.zoho.com/creator/help/api/v2.1/upload-file.html

An alternative would be to save the files in WorkDrive, then you can create the records in Creator and after you would setup a schedule to fetch the files from WorkDrive and save them in the subform.

Thanks, but my question is more "how to create an entry in Creator for each entry of a subform in Forms"

  • Zoho MVP
  • 5 days ago

My approach would be to use Zoho Flow to create a record in Creator with the JSON data from the Zoho Form entry, then using an "On Success" workflow script in Creator I'd loop through the entries in the JSON and add each row as necessary...

That's what I would like, yes, but I can't do it. In Flow I can't find any action to iterate through a JSON of my subform, and with a Deluge script I can't find a script either.

If you have a concrete example to offer me, that would help me a lot. Thank you

Reply to Maxime BoryA
/* */
  • 12
  • Insert
  • Plain text
Add Comment
(Up to 20 MB )