Autopopulate database field A based on entry of front end field B

Sorry for the confusing title. I’m having trouble describing what I’m trying to achieve. I have a form with a drop-down field. The values are things like “Uber”, “Lyft” and “Airbnb”. If the user selects “Uber”, I want the entry in the database to not only capture the entry of “Uber”, which works fine, but I also want it to automatically add the value of “transportation” to the database where I have a field labeled “category”. Similarly, if the user selects “Airbnb”, I want the database to know that is category “Accommodation”, and populate the field accordingly in the database.

How can set these associations, and have the database entries automatically populated with the category? I don’t want a “Category” field on the front end

@romanmg I saw you provided some great answers and seem pretty knowledgable with databases. Maybe you would be able to answer this question for me? Thanks in advance

2 ways of doing this.

  1. If the number of categories is less (say 3-4), you could do this in the workflow itself while creating the thing.
  2. Create a data type where you map each service with its category and populate your database from this data type depending on the selection.

Hope this helps.

Hi @m.maccou, I’d do @anil’s option 2. Link your Services with Categories so that when a Service is selected, the Thing you’re creating would save Category as “Service’s Category”