Button > Action > Create Record > Can't update with selection from related table

I’m creating an application that allows a user to select an item that they observe. In this case it happens to be different types of vehicles. The user will push a button that corresponds to the vehicle they observe. I have 3 collections in my database: Users; Sightings; Car Types.

Database Collection Relationships:

  • Users to Sightings (1-to-Many)
  • Sightings to Car Types (Many-to-1)

The desired behavior for a button being pushed (in this example, the button will be “Yellow Car”), would be for the Sightings Collection to be updated with the following information (this is a subset to illustrate this issue):

  • Sightings ‘Date’ field w/ the current date/time. (unique field, this works fine)
  • Sightings ‘User’ with the current user (related field, this works fine)
  • Sightings ‘Car Type’ to be updated with “Yellow Car” (related field (Car Type), this doesn’t work)

When setting up the Create Record action, I’m expecting to be able to choose a record (Car Type, in this example I would want to select the “Yellow Car” record) from the related table to update the Sightings table. That doesn’t seem to be the case.

Any help on achieving the desired behavior would be greatly appreciated.

Hi @dschirm,

Welcome to the community :partying_face:

So a user can have one sighting and a sighting can have many users ( opposite has to be happen right? ) and a sighting can have many car types and a car type can have one sighting right ( opposite has to be happen right? )? In here Sighting collection does is that recording what the user choose right?

Do you have the same relationships? ( Just created based on your relationships. Not sure properly your relationships, so this may wrong! )

image
image
image

Need to know your setup properly first. Let me know!

Thank you

Thanks for your response Dilon. To clarify:

  • A user will have many sightings, but a sighting will only have one user associated with it.
  • A Car Types record will have many Sightings records, but a Sightings record will only have one Car Types record associated with it.

Desired outcome is to have a user push a button and have a sightings record created that also includes the appropriate Car Types record being associated with the sighting. Since the Car Types field is a related record it, apparently, isn’t letting me select/place anything in it via the norma actions screen (or I’m just an idiot, which is completely possible).

To clarify on the buttons: My original plan was to have a button for each Car Type (there is a limited number, 6 to be exact). So from a logic standpoint, a button represents a car type.

Thanks again.

Awesome! This what I thought too!

Correct right? : Car Types.mp4 - Google Drive

Dilon,

That worked brilliantly!!! Thank you so much for you help. You are awesome.

–Dave

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.