Verification field that fills in other fields

I apologize for the title. I’m really not sure how to describe this or what to look for with this. Please bear with me and if you can point me in the right direction in terms of what to research, I would be majorly grateful.

I am creating a sign-in app for visitors. When visitors walk in the door, they need to sign into the building using a tablet. I would like to make it so that when employees sign in, they only need to enter their employee ID number. Upon inputting their employee number and submitting the form, the app then uses their employee record to fill in the person’s name, company name, visitor type, and current time to the sign in table.

What is this called? How would I go about doing this in Bubble? Are there resources out there for this process already? If you don’t want to take me through step-by-step, but would rather point me in a direction, I’m all for this. Just not sure where to start here.

Hi there, @bryan.beneker… if I understand your post correctly (which could easily not be the case), it sounds like you are describing the act of linking one data type to another. So, you would have a sign in data type, and that data type would have a field called visitor that is another data type, maybe called employee.

When a visitor signs in, you create a new thing in the sign in data type, and you set the visitor field of the newly-created thing to the first item in a search through the employee data type for a record where the value in an employee ID field matches the one that was entered by the visitor. You would also want to add a condition to the creation step that creates the new thing only when a search for a matching employee record is not empty.

Because the sign in data type is linked to the employee data type via the visitor field, you don’t have to “fill in” any of the employee’s information in the thing you create in the sign in data type. You will be able to pull all of that information from the employee data type because the two data types are linked together.

Does that make sense and does it sound like what you are trying to accomplish?

Hope this helps.

Best…
Mike

Yes, I think you have down what I’m trying to accomplish.

I went in and fiddled around with your direction here to see if I can get things to work. I clicked on the button that will be used to send the data and started a workflow to create a new thing. I tell it to search associates for IDs that match the input. It keeps wanting me to add more. I’m assuming I need to state what I have in the screenshot, choose ‘and’ and then specify which fields in the Associate table I want to include. Would that be right?

Screenshot

A couple of things…

  • If AssociateID in the CheckpointLog data type is a text or number field that is storing an actual ID, I wouldn’t do that. I would have that field link to the Associate data type, and I would populate it with an actual employee record (not the ID in a field on that record).
  • Set the field equal to the first item of a search for associates, and add a constraint to the search where the ID field in the Associate data type is equal to the Input Employee ID's value. In other words, get rid of everything after :first item in your screenshot, click on Search for Associates, and add the constraint there.

Cool, I got the second part of what you’re telling me. I will try to run with that tonight and get back to you.

I’m a little hung up on the first part about the ID. Not sure I’m completely understanding. If I understand correctly, you’re telling me not to display the ID on the Checkpoint data type. The ID won’t be shown on the site at all. It’s only used to verify the associate. What will be spit out onto the page will be the person’s name, their company, their type (employee), and the time they signed in. The ID won’t be visible for anyone (other than the database).

What is the field type of the AssociateID field in the CheckpointLog data type?

It is Associates.

CheckpointLog

Oh, good… then you should be able to do AssociateID = Search for Associates:first item with a constraint on the search of AssociateID = Input Employee ID's value.

Sorry it’s taken me some time to get back on this. I have to kind of fit this in amongst my other work duties, and haven’t been able to do so the last couple days.

So I followed your directions to search for Associates:firstitem and then used the constraint of the input value. I ran it, and the person’s name goes into the Checkpoint log data type. However, it doesn’t show the person’s company or visitor type of that record in the Checkpoint Log data type. How would I get those to go in with the name?

Bubble used to have a thing where I could click and get a reference to what I was working with (Bubble documentation). However, I’m not seeing it anymore since upgrading to the new responsive engine. Can you point me to where in Bubble Documentation I should be looking for expressions like :firstitem? I want to read up on these as I think this will help me wrap my mind around performing these tasks.

You don’t need to store the person’s company or visitor type in the CheckpointLog data type because you can get that information through the AssociateID field that is linked to the Associate data type. So, if you wanted to display a person’s company, you would have the expression CheckpointLog's AssociateID's company (assuming the name of the field in the Associate data type where the company is stored is called company).

About those reference links, they are still there when you hover over an item for a couple/few seconds. So, if you go to any dropdown where :first item is displayed and hover over it, the reference link should pop up.

I do apologize for having trouble wrapping my head around this. I have a very limited (dated) understanding of databases. Taking a class dealing with databases and relationships was 15 years ago. In that class, each field and relationship had to be defined. I looked in the database and don’t see the company and visitor type information. But yet, on the Checkpoint Log page I do see that the data is showing. Mind is blown…

Thank you so much for your time and excellent patience. I am so grateful! Because this seems to work a bit differently, I’m going to have to play around to figure out how to access information between pages and pop ups.

1 Like

No need at all to apologize… happy to help. Just keep on going, and Bubble will keep on blowing your mind… it really is an amazing platform.

1 Like

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