How to delete/edit a record where a field matches a value?

  • 1
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
I have an app where clients (non users) are the parent table and their assets are the child tables and everytime a client is created related child records are created with no asset detail. That occurs because that part is done further on and by other people, according to their functions. Although, we control assets without clients assigned also. And I want to create a button for assignation where you would select the specifics of the asset and any record that has no client and matches the specfics would be assigned to the client. So there wouldn't be a inventory issue due to duplicate records. If there is also a way to automate the process that would be ideal.
Photo of PatriciaSabelli Fabbri

Posted 2 years ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,306 Points 50k badge 2x thumb
Can you clarify what you mean by this?

"you would select the specifics of the asset"
For example we manage lockers. And every locker has a number. So when the person responsible for the lockers enters in action he would check a locker that is available (that has no client assigned to it) and then enter the locker record related to the person, assign the locker and then delete the record with the same locker number but with no client. Or assign the empty locker to the client and delete the other record. So my idea to optimize the process would be while editing the form have a multi select field for the locker number so you could easily select the number of that locker record and then have the button gather that information and use it for the edit or deletion.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
It sounds like you are looking to assign a piece of inventory (asset) to a client, even when the asset and client are made at different times, and not related.

What type of "unique" identifier are you going to use to link the two?  

At what point do they become linked?  What triggers the connection?  Is the asset sold from inventory?
There are two types of records: the records with clients and the ones without. For the ones with clients: they are made at the same time using webhooks. When a client is created so are his locker, computer and so forth. And the tables are related through a parent-child relationship. The client being the parent and the other the child. I'm just using a "Related Client" field so when the webhook triggers I write the Record ID# of the client on the child record. For the ones without clients: they are created manually or via excel import with an empty Related Client field. What I meant by other data being imputed later was related to the locker number, for example, which is not up to someone imputing the Client into the system.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
I'd recommend creating a joined table.

Basically you will have a "Locker Assignments" table.  Each Client has many assignments AND each Locker will have many assignments.

Then within the assignment you can have start and end dates, and easily be able to tell if a locker has an "active" assignment.

That will also drive your reports and drop-downs for "Available" lockers.

Then you will also have a history of locker assignments, whereas right now it looks like you lose that when you change the current dropdown connection.