Conditional List of Forms (Add New Item)

Sorry for the odd title as I’m not sure how to describe what I’m looking to do. At one point I knew how to do this and forgot. I asked on here and can’t find the thread. Hoping someone can re-teach me.

What I’m trying to do is make it so that if the user clicks on a group that says ‘add issue’ it will then show a group with form fields for the user to fill out about the issue they found. Then they have an option to add another issue by clicking on add issue below the form group below that. It will load as many forms as they need.

My question is two fold: First, how do I do this with the groups on the page? Second, how would this work with the database? I imagine it will be a list of some kind that I’m creating.

Below is a mock up of my pop up layout. I have outlined the steps that I’m trying to achieve. ‘Steps’ equate to clicks or filling out information in order to visually see the next section.

If it helps, here is a list of all of the topics you have ever created… shouldn’t be too hard to track down the existing thread there.

@mikeloc I looked through these last night. Just to double check, I did a look through again and am not seeing it. It’s possible I didn’t actually ask here and am misremembering. My first project I bounced a lot between asking questions here, looking up answers here, and online videos. So it’s hard to say.

Maybe I don’t understand what you are trying to do, but it seems like you just need an Issue data type, and when a user fills out the fields and adds an issue, create a new thing in the Issue data type and show it in a repeating group that displays issues created by the current user.

2 Likes

That’s not the direction I was going with this, but your approach may very well be a more simple, if not more practical approach to this solution. Not to mention it will take up less space being in a popup.

Just to show you what I have for my current datatype. I planned for users to be able to add multiple locations, doors, and issue descriptions. But making a separate datatype for door check issues and just adding them in to this form’s datatype may be the answer. Let me give it a whirl here and see.

1 Like

@mikeloc Sorry that took a while. I had to adjust the design of everything (layout, database, etc.).

I think I need to explain what I’m doing so it makes sense as to why it’s more convoluted. This part of the app creates security reports. To start the user will simply fill out the start and end times of their shift on a page.

That page will then send the created data (ReportID = unique id of the created datatype) to a builder page where the user can choose various forms they want to fill out. That page is rigged to attach the ReportID to every single form they fill out so that links all the data together into one report (they all have the same ReportID when submitted). The reason I have done it this way rather than organize by date is because some officers work nights and start in one day and end in another which messes everything up. A ReportID gets around that.

Now that you have the backstory, the new datatype that I created is called DoorCheckIssue. Below is the create new thing setup for that. This creates the repeating group.

Now when I want to submit all the information in the popup (including from the repeating group), this is my create new thing setup. Usually the datatype is set to what you’re creating, but in this case the popup is set to the ReportID. So I did a search for DoorCheckIssues that have the parent group’s ReportID to add as a list for the DoorCheckIssue datatype when creating a new thing. Will this work reliably?

If I followed all of that correctly, I believe it should work, but if the repeating group is displaying the correct list of issues, you should be able to add the repeating group’s list of things to the DoorCheckIssue field instead of doing another search.

1 Like

OK, I’m used to just playing around with dates, inputs, multiline inputs, and dropdowns when creating things. I haven’t used repeating group values to do it before. This is what you’re talking about?

RepeatingGroupList

Yup, that’s what I meant.

This did the trick, sir! I’m sorry it took me some time. Between the redesign work and the testing it just took some time. But it all went through to the database. It all displays correctly. Thank you as always for the help, but I also appreciate the practical direction! My design was overly complicated and this helped.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.