Help

Re: Create records based on configuration

2706 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Marc_Torra
5 - Automation Enthusiast
5 - Automation Enthusiast

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}

Screen Shot 2022-07-28 at 12.10.21 pm

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

Screen Shot 2022-07-28 at 12.12.12 pm

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.

Screen Shot 2022-07-28 at 12.32.30 pm

Screen Shot 2022-07-28 at 12.33.02 pm

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. :slightly_smiling_face:

3 Replies 3

Welcome to the community, @Marc_Torra! :grinning_face_with_big_eyes: 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.

Marc_Torra
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks @Justin_Barrett. :slightly_smiling_face: 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.