Auto Tag Form With Unique ID

I made this post the other day with no responses. It explains what I’m trying to do with my app if you want background on what I’m attempting to do.

After thinking things through further I think I have a more direct question as it may (hopefully) be more simple than I’ve made it out to be. How would one go about snagging the unique id from an entry and tagging other form submissions with it?

What I want to do is have a user click a button that creates a report and they fill in a few quick details. Then it will go to a page where they have options for different forms they can fill out. Each button they click will open a different form with different information requirements. I want to tag the unique id that was from that report that the user just created to each form they fill out so that it can be used to connect data types on particular shifts.

The concept is kind of like products (forms) going into a cart (report). I don’t know if this will work. Any detailed direction on how to go about this would be appreciated.

How about when someone creates a form, if it is not linked to a report then the report is made and the report will have a list of forms. If the user moves on to another form, you can just check again if there is already a report, and if there is then ad the new form to it but if there isn’t then create a new report. And from reading both posts it seems like it would be like a daily checklist of completing different forms but they can all b created in any order. So I would say if someone creates a form and a search for reports where creation date is equal to the current date does not exist then create a new report. Otherwise, add to the existing report.

@williamtisdale It would be nice to be able to do a search simply on date, BUT a problem comes in with night shift officers. They have odd hours where they start in one day and end in another. So this would end up messing up the entries. That’s why I have opted to ask for the unique id to get around the date anomaly to force them all into one shift.

But yes, it’s a daily report log where they complete forms based on what tasks they complete and what activity they find. Your idea with creating a form and linking reports to forms, would the user be doing this or would I be doing this on the backend? I’m trying to make this as simple as possible as a lot of the people that are going to be using this aren’t very tech savvy and I don’t want to confuse them.

The creation of reports and which report is linked to the forms should all be handled on the backend. You could have someone make an initial form which really just creates the report and has fields like employees on duty, times worked, and general info. Then make sure whoever does the last form uses some workflow to submit the final report as complete. This will serve as a way to determine which report is currently active and should have forms added to it.

@williamtisdale OK, these would all be submitted by one officer. So we wouldn’t have to worry about multiple people submitting reports. Basically you have each person doing a certain number of camera reviews, interior patrols, exterior patrols, audits (your forms) and they would be organized into the report as a shift.

But my question is how would you tell Bubble to search for, just for example, camera review entries, that unique id for the report when you won’t know what the unique id is?

You will have to decide how you know which report should be accessed. You can either use custom states or some field in your database to determine the open report. You could use dates, a field on User, a “yes/no” field on report. There are many ways. I don’t think you need to get caught up on specifically using unique id’s. You could have an active_report field on User that is a report and then just always add the form to Current user’s active_report.

Thank you. You have given me a lot to think about here and really kind of clears the cobwebs so that I can move forward. All I really knew was that I needed to establish relationships to get these things to work. While this is a small step, it’s an important one. Thank you!

1 Like

I do think the connection though would be a field on Report that is a list of forms. Or several fields like cameraAudits = a list of forms auditing the cameras and exteriorPatrols = a list of forms for exterior patrols.

1 Like