Hello everyone,
I’m developing an app for myself where I can upload structured finance articles (that myself or peers write) and legal precedent/rules, the result being a highly specialized database for our profession members to seemlessly consult.
To this end, I am among other things structuring a form that will, once completed, generate two data types. I have simplified the description of my data structure to focus on the problem.
DATA STRUCTURE
Data type 1
Field 1: Text
Field 2: Option set 1
Field 3: Option set 2
Field 4: List of Data type 2
Data type 2
Field 1: Text
Field 2: Option set 3
Field 3: Data type 1
FORM STRUCTURE
Question 1 // Text input
Question 2 // Dropdown for option set 1
Question 3 // Dropdown for option set 2
Question 4// ADD ITEMS 
Question 4 List of inputs fields to fill per added item
input 1 : text
input 2 : Dropdown for Option set 3
I understand that upon submission of this form, submitted data will populate two data types:
Data type 1 and
Data type 2.
Here are the two questions that came up as I was building:
I°)Form filling process: Question 4: Impacting only this form’s user’s added items to a repeating group that he can visualize as he types
The form user can add multiple items that each bear 2 inputs as explained in the Form structure.
1°)a- User interface / Adding a list of fields when filling out a form
This is very likely a question that has already been asked, but so far I am finding solutions on how to have a user pick out multiple items from a repeating group populated with preexisting data as an answer to a form question (applied to my app this would be
Form question 4 ).
My objective is to allow a user to add a new item to
Form question 4 by submitting his own unique inputs, for as many inputs as need be. If anyone has a link to a video or forum treating this functionality I would be ever so gratefull.
1°)b- User interface / Showing the list of added fields in a repeating group apparent in the form (prior to data submission)
It seems that I cannot have a repeating group unless I send the data to my database beforehand. The issue is that, first of all, I don’t want the data to be submitted yet, I just want the user to add inputs to this question and visualize what he has added, and move on to the next question of the form; but let’s assume that this cannot be done, and have a workflow create the new inputs in the data base when the user submits his new items, before he moves on to the next question: this data would be sent to
Data type 2 as orphan data, since
Data type 1 has not yet been created, thus no key to link. Therefore, my repeating group will not be able to discriminate all the other
Data type 2 that may have been submitted either by this user or another, since
Data type 1 key does not exist yet.
II°) One form submission button, multiple data type creation
Finally, I am wondering about how to go about with actually submitting all these data elements in a linked manner.
In other words, the clicking action of my Submit button is tributary of multiple workflows. I need to create two new “things”: some answers are to populate
Data type 1 and some to populate
Data type 2.
Is there a best way of/best practice for doing this? Because I see various solutions to various problems but I’m not confident with patchworking my way out of this one.
I hope the problem was clearly exposed, and than you for any input!
Cynthia
