I’m trying to build a form that creates a new user. One of the fields for the user is a custom data type called “Family Members” that is a list of Family Members. The Family Member data type consists of First Name, Last Name, Date of Birth, and Relationship (which is pointed to an option set consisting of choices like “Spouse”, “Son”, “Daughter”, etc.). Essentially what I want to do is create a list of family members of the user that may be of any arbitrary number of entries.
I tried to do this by creating two custom states on my entry page. The first is a single “Family Member” data type. The second is a list of Family Members. I then had a repeating group on the page linked to the custom state list of Family Members (for display purposes). I also had four entry fields for the four fields on a Family Member. When I click a button I set up a two-step workflow that Makes Changes to a Thing by mapping the four entry fields to the single Family Member custom state and then secondarily adds that Family Member custom state to the list of Family Members custom state (and subsequently displayed in the repeating group). On submission of the new user form, it should take that list of Family Members to populate the user’s Family Members list.
Ideally, I create a new user called John Doe. I type out his name, and then can add Jane Doe, Mary Doe, and Bob Doe as family members. When I save out the John Doe user it also creates the three family member records for Jane, Mary, and Bob, and puts their records in the list of Family Members in John’s user record.
I can actually set this up in the interface and there are no issues or errors, except it doesn’t work. Stepping through the workflow, it appears that the data from the entry fields exists but never populates the single custom state Family Member type and thus never adds anything to the Family Member list.
Clearly I’m doing something wrong. Is there a way to fix this, or is there a better way to do a one-step entry of this type where you’re doing an insert into an object that may have a field that is a list of multiple other objects that are also new?