Create records based on configuration

I would really appreciate if someone could help me with the following script:

I have a table called VARIABLES with certain costs {variable_name} and the possibility to assign to a cost concept different groups of assets {variable_groups}

Then I have a second table called ASSETS for entering assets, where I always assign one group to each asset being entered.

And I finally have a third table called COSTS connected to ASSETS in a one asset_id to many cost_id relationship with a field called {Cost name} that Links to the field called {variable_name} in VARIABLES.

I need a script to be triggered when a new record is entered in ASSETS that:

  1. Reads the group to which this asset belongs {Group},
  2. Checks in VARIABLES what costs {variable_name} have this group assigned in {variable_groups}
  3. Creates in COSTS one record for each {variable_name} that has this {Group} assigned.

In the example for {Group}= “Vehicles”, we can see how it creates 6 records in COSTS connected to the asset_id just entered in ASSETS, one for each of the 6 {variable_name} in VARIABLES that has “Vehicles” in {variable_groups}.

Thank you so much for your kind assistance. :slight_smile:

Welcome to the community, @Marc_Torra! :smiley: Are you looking to hire someone to write this script, or are you looking for assistance in learning how to write it yourself? You included lots of awesome detail about what you want this script to do, but I couldn’t clearly infer how you want to go about going it.

Thanks @Justin_Barrett. :slight_smile: My main motivation is to identify someone with the skills to do it who I can contract every time I have a new need for a script. My second motivation is to learn scripting by analysing the code they wrote.

I’d be happy to help with this. I’ll ping you directly to discuss the details.

For future reference, there is a #developers:work-offered category where you can post when you’re looking to hire a consultant or developer for a project. The category where you posted this thread tends to be geared more towards help with specific scripting issues; i.e. if you have a script but it’s not working as you wish.