1

What would be the best UX for a situation where one set of records cannot exist without another.

Take a scenario in an application where a child can be connected to zero or more parents.

If a user of our application finds himself filling in a form to create a child but the parent for the child does not exist yet, what is the best approach to creating the parent and then attaching that parent to the child.

  1. Should the child be created without the parent, but updates can be done to add the parent to child (note that this also has its own issues as the page where the addition will occur might also need to create the parent).
  2. Have a link on the child page that says "create parent", and route the user back to the child page after creating the parent.
  3. Have a button bring up a modal that has the parent form and allow the user to create the parent before returning.

I don't like any one of these three options and I am hoping there are better approaches out there.

Sorry for any typos or ambiguity, in bit of a rush.

3

I'm a personal fan of keeping things clean and every screen serving a single purpose.

As such if there is a hard dependency on the parent item I would provide guidance as applicable.

Eg lets say you are creating a schedule (child) for a staff member (required parent).

There are 2 scenarios:

1.) most of the time the first field of the schedule would be selecting the staff member that this schedule is for.

2.) if there are no staff yet, or the staff member hasn't been created yet, then you want to provide the option to create one first. Depending on your apps design, this could be an overlay or just simply takes over the existing flow.

0

Can you tell me how you're displaying the data? Is it in a table or form or...? What are you trying to accomplish?

If I am understanding correctly, a child must have a parent.

In the database, be sure the 'ParentID' field is required but can be null. Then you can manipulate it how you want.

A table can have an Edit/Delete option in the last cell, the user can add the parent in this view. Similiar to what @scunliffe mentioned, if parent = null, then creating the parent will simply be part of the workflow.

For a form, you can do the same thing, have a button on the top or bottom with the option to "Edit".

You said you don't really like modals, and I get it. But they are a great solution to add data quickly without rerouting a user all over the place. If you're adding a parent using a modal, the modal should appear already populated with the child's data; the parent field will say "null". If the user clicks the edit button, s/he can add the parent data. Depending on how you have it set up, the user can "Save and add another", in this instance, a confirmation message would appear letting the user knows the parent s/he added has been captured by the system. Then the form will reset for that child and the user can add another parent or guardian, etc. If the user doesn't need to add another parent, there would be a "Save" button which would trigger the confirmation message, and the modal would close.

In both scenarios, be sure the buttons or links are large enough on a mobile device, ensuring users are able to tap the correct element to access the correct functionality. Do this even in a desktop application.

I hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.