Import From File Window

This functionality can be used to import information from a file into fields for existing animals. For example, if you had ultrasound or carcass data that was sent to you as a file, you could import it into Fusion using this window. It can also be used to create new animals based on the information in the file. For example, you could import information from a previous system when switching to Fusion on transition day or you might want to import animals from where you purchased them from.

Choosing a File

When you first choose this option in the Animal List window, you will be asked to choose a file. Fusion can deal with tab-delimited and CSV. It can also handle the specialized "B5" carcass data file from Cargill. Make sure you are choosing one of the supported file types.

Showing File Contents

After you have chosen a file, Fusion will read the file in and attempt to split each row into columns. It will then display these rows and columns in a grid type format. The first step is to look at the information in this grid and make sure it looks like Fusion split the rows and columns up the way you were expecting. If it did not, the structure of the file may not be supported by Fusion.

Optionally Creating Animals

By default, animals will not be created when the import is run. If a matching animal cannot be found in Fusion, it will be considered an error. If you want to allow animals to be created, use the popup at the top of the window to choose the location newly created animals will be associated with. All animals being created must belong to the same location. (Animals just being updated can be from any location.)

When a location is selected, Fusion will still try to match an animal already in Fusion and update it. An animal will only be created if a match cannot be found. The New Animal column will indicate whether the row will create an animal or not after the file has been verified (see below on how to do that).

You cannot use the import to change the lot of existing animals, but you will be able to assign lots to newly created animals. If the import file contains the lot name of each animal being created, Fusion can use that information to set up better default values for several fields.

When creating animals, make sure you include at least one ID field, such as RFID. Also consider trying to fill fields such as the In Date, In Weight, Current Lot, Current Pen, Home Pen, and Birthdate. In many situations the Pre-Fusion Withdrawal Date and Pre-Fusion History fields are useful to fill as well.

Choosing What To Import

You can choose which columns and rows from the file you will import and what fields each column will be imported into. You also need to tell Fusion how to figure out which row should be associated with which animal so it saves the new data to the correct animal.

The left most column is labeled Import. When the import takes place, Fusion will only import rows where this column is checked. For example, some files will have header information in the first row which you would not want to import. Make sure you uncheck rows that shouldn't be imported. You can Alt-Click (Option-Click on Mac) a checkbox to change all the rows at the same time.

For the other columns, you need to Right-Click a column header and choose an option to tell Fusion how to handle this column.

  • <don't import>. This is the default option. When set for a column, Fusion will not import information from this column.
  • Match. You must choose at least one column that has an animal ID in it so Fusion can figure out which row belongs to which animal in the database. Even if animals will be created from the import, Fusion needs to check to make sure it isn't already in the database. This column will not be imported for existing animals, but it will for new animals. For example, if one of the columns in the file listed RFID numbers, you would Right-Click the header in that column and select the RFID → Match option to tell Fusion it should match this column with the RFID field. Only ID fields and the Lot field can be used to match. The lot field is useless if it is the only match column, but it can be used in conjunction with other ID fields in case the same ID appears in different lots. So you can match on more than one field to make sure you are getting the right animal.
  • Import. If you select this option for a field, the contents of the column will be imported into the chosen field.
  • Other Options. Some fields can be chosen without selecting Match or Import. Choose one of these fields to import the column into it. If the field is a date field, you will need to choose the format of the date in the file so Fusion can correctly interpret the dates. Note that the period in each date format is just representative of any delimiter, including hyphens, underscores, etc. Let us know if more date formats need to be supported.

When you are done, the column headers will describe which field (if any) the column will be imported into. Purple columns are "match" columns (and will be imported for new animals) and green columns are "import" columns. White columns will be ignored.

Importing

To start the import, click the Import… button. You will be given two options:

  • Test Validity. If you choose this option, Fusion will check the import process without actually importing anything. If any errors occur, Fusion will let you know and list them in a new red column that is added to the list labeled Import Error Message.
  • Import. Click this button to do the actual import. Fusion will look up each animal and update the fields you have chosen based on the contents of the file. Or create animals if you've set it up that way. If any errors are encountered, Fusion will list them in a similar manner as explained in the Test Validity option. The difference is that Fusion will remove any rows that were imported successfully so you are only left with the rows that caused errors. If you can fix the errors, you can try again.

About Errors

When errors are being shown, you can scroll through the list looking for each row that has an error. If you have a lot of rows and few errors, it may be hard to find each error. When errors shown, there is a Show Next Error button that can be used repeatedly to have Fusion show you the next error in the list.

Presets

If you need to import the same type of file many times, you won't want to have to set up each column association over and over. Instead, you can save the setup as a preset and apply that preset each time you pick a similar file.

Saving a Preset

Once you have associated columns and fields and are sure the import will work correctly, click the Presets… button and choose Manage Presets. You want to add the current setup as a new preset, so click the + button in the window that appear. You can then give the preset a name so you can use it in the future.

If you make more changes and want to save the changes, click the Presets… button again and choose Save Changes To Current Preset.

Using a Preset

You can use a preset by clicking the Presets… button and choosing Manage Presets. In the window that appears, select the desired preset and click the Use Selected Preset button. While you are in this window, you can Double-Click the name of a preset to change the name. You can also select a preset and click the - button to delete it.

After you have chosen a preset, Fusion will apply it to the columns and show the name of the preset being used next to the Presets… button.

What's In a Preset

A preset saves each column/field association. It also saves whether the first row should be imported or not. It does not save whether other rows should be imported or not, so if you have a file where the first several rows should never be imported, you will need to manually uncheck the other rows each time. It also doesn't save whether a location is selected.

If you import into the Note or the Pre-Fusion History fields, Fusion will append information to the field if there is already something there, rather than replace it. This is different from the Grid Edit window.

After the Import

When the import has completed successfully, Fusion will put a special filter on the Animal List window so that only animals that were involved in the import are shown. This gives you a chance to see that things happened correctly. Click the Clear button in the Animal List window to remove this filter.

You cannot undo an import! If you are trying an import for the first time, consider trying with only one or two rows and checking that it works the way you expect first.

Field Values

Some fields will only accept certain values, so you'll need to make sure the import file is set up with the correct values.

  • Current Lot. When an animal being created is associated with a lot, the lot name must be exactly the same as in Fusion (although it is not case-sensitive) and the lot must be in the location that is chosen at the top of the window.
  • Current Pen. Must match a pen number from the animal's current location.
  • Home Pen. Must match a pen number from the animal's current location.
  • Sex. Can be blank or "Female", "Male", or "Unknown".
  • Breed. Must match an animal breed as set up in Fusion.
  • Color. Must match an animal color as set up in Fusion.
  • Cattle Type. Must match a cattle type as set up in Fusion.
  • Source. Must match the display name of a contact set up in Fusion. Not case-sensitive. Note that this will fail if multiple contacts have the same display name.
  • Implant Products. Must match a drug name set up in Fusion which has the units set to "implant". Not case-sensitive.

Getting Here

You can open this window by choosing Modify → Import From File… from the Animal List window.

Related Topics