Manipulation of Sub-forms Through API
AnsweredIs it possible to insert sub-forms in a main form through the API 6.0? If so what is the structure like in JSON? I have been attempting this however I believe this is not possible. I know that we can import sub-form data via CSV files when we create new records, however I don't understand why we cannot do this through the API.
If the previous is not possible can we manually set the "parent_record_id", "parent_page_id", and "parent_element_id" manually whilst inserting a new row so I can manually link the sub-form row to the parent form row?
-
Official comment
Hi all, great questions and this is doable in version 6.0 of the API. The structure of the API is that you are creating records in a given form (page).
Therefore you need to call the record API for the parent first and then use that response (record ID) to pass along to the request making the subform records.
Just like the CSV upload approach, you just need to get all the parent information (record, page, element) in order to created parent child record sets through the API.
Hope that helps!
Comment actions -
Hey Max and Bilal, if you already have a parent record you want to add more children to, then you need to find the PAGE ID, ELEMENT ID, and RECORD ID of the parent the child belongs to, and just include those in the request the same as all the other data you are populating.
Hope that helps,
Tony
Please sign in to leave a comment.
Comments
4 comments