/build/static/layout/Breadcrumb_cap_w.png

Mass changing a field in an asset record

We use our Asset inventory to track all computer orders even after they've been long retired, one thing we need to be able to do if possible is to be able to make a mass change to a particular field, I will describe the situation. One of the fields in the Computer asset type is "technician" which currently is set up as a Multiple Select field type. The problem is that we'd like to be able to make a change to one of the techs names (if we hire a replacement) and have it populate through the database without requiring an export to CSV, changing all the fields in the CSV file, then re-importing. My understanding is that we should be able to make this happen possibly by creating a new asset type called "Asset Technician" and then populating THAT with technician names. My problem is that I'm not sure how to do that properly.

If i Create a new asset type called "Technician" do I then create individual Asset Fields with each being the name of one of our techs? Do i Set a default value? What do I set the type to? Am I even sniffing up the right tree as how to best accommodate this situation?

0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: Jbr32 10 years ago
10th Degree Black Belt
1
This can be accomplished via a custom service desk rule but be very careful and make sure your SQL is correct as you can hose your box.  I should also mention this is unsupported.  

Create a new rule.  
In the select part of the rule type in a simple select and limit it to 1 as we won't be using it.  

In the update part of the rule that is where you can add your SQL to swap out techs. When you first run the rule I would recommend limiting it to 1 for testing.  Then once you know it works you should be good.  

Probably best to backup your system prior to.  Practice your SQL using mysql workbench.  
Posted by: grayematter 10 years ago
5th Degree Black Belt
1
While you can use a custom service desk rule to update the database, as noted, that method is not supported and can cause unintended consequences.

You are on the right track with creating an Asset type of Technician.  You create multiple Technician Asset records, one for each technician to be listed.  You can add other fields, but the Name field is what gets populated into the drop down list in other assets.  Then, when you need to edit the name on one of the records, just update the single asset record and you are done.  Though this may be laborious initially, it is much easier and safer later on.

Comments:
  • Perfect, thanks! - muellerm 10 years ago
Posted by: chucksteel 10 years ago
Red Belt
1
Create a new asset type called Technician
Add whatever fields you want to the asset type, you just need name but you can add contact info if you want.
Save the asset type

Add New technicians by selecting the Choose Action, Add New, Technician on the assets page. 
Enter all of the required information for each technician (if you have just the name, then enter just the name).
Repeat for each technician.

Edit the Computer asset type
Add a new field. For the type select Asset Technician. I wouldn't set a default value personally, since this would allow you to search for computer assets that don't have a technician assigned.

When you edit or add a Computer asset you will be presented with a selection of Technicians that were added previously.





Comments:
  • Thanks! That's good to know about the default field, it'll make it easier on us like you said when we need to search for unassigned computers. - muellerm 10 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ