Add or Modify Data

Titleā€ƒ Add or Modify Data

Summary

A tool to modify data in the PISCES database. Given a number of parameters to filter the records, it adds, removes, or transfers records in the database. Allows you to pass in selected HUCs from a layer to be used as a subset of HUCs/observations to change in a species' distribution. This tool supports adding those HUCs as new expert opinion data, transferring observations for those hucs from one species to another, and invalidating observations for those hucs. The operation can be further subsetted to fewer observations via sql.


Usage

Syntax

AddData2 (Zones, Species, Operation, {New_Species}, {Message}, {Subset}, Default_Input_Filter, Default_Observation_Set, Presence_Type, {Return_Updated_Expert_Knowledge_Layer})

Parameter Explanation Data Type
Zones Dialog Reference

The feature class or feature layer that contains the zones (HUCs) or subset thereof (selected using interactive selection or selection tools) that you want this tool to add, remove, or transfer. While this defaults to a HUC12 layer, be very careful to ensure that you are not adding and removing all HUCs unless you intend to do so - this would occur, for example, if you have nothing selected, but pass the layer in. The tool will alert you if you accidentally pass an unselected layer of all HUC12s in.

If you do make a mistake, you can restore deleted records via the Undo Transaction tool.

Feature Layer
Species Dialog Reference

Select the species you want to perform the data operations with these HUCs on. If you are transferring records, this is the species to transfer records from.

This field supports autocomplete of options, so long as you type more than 5 characters (and then move the cursor to the next box)

This field also supports the following commands:

  • load- the "load" command loads the last species that was edited from the PISCES database and places it into this field.

String
Operation Dialog Reference

What do you want to do with the records for the given HUC12s and species? The add operation results in new records for the selected HUCs being added to the range for the selected species. A transfer invalidates ALL records for the selected HUCs for the selected species (optionally only operating on observations meeting the subset clause below) and copies new records in to observations for the transferred to species. Remove only invalidates all the records for these HUCs for this species that match the additional parameters

String
New_Species (Optional) Dialog Reference

Only valid for transfer. This is the species that will receive the data in the selected hucs.

This field supports autocomplete of options, so long as you type more than 5 characters.

String
Message (Optional) Dialog Reference

The message to be added to the database about this change. For transfers and removes this will be added to the invalidation message. For new data, this will be added to the notes field. Generally, a message that indicates the rationale for the change and any other information about where supporting data or information is available helps.

String
Subset (Optional) Dialog Reference

A SQL where clause to subset transfer and remove operations. Do not include the word "where," but include all other sql operators. The table being operated on is Observations, and those fields are all accessible for subsetting.

Example: if you only want to operate on historical data from the MKS input filter, your subset query would be "input_filter = "MKS and Presence_Type = 2"

String
Default_Input_Filter Dialog Reference

Which input filter will these new records be assigned to?

String
Default_Observation_Set Dialog Reference

What Observation Set will be assigned to any new records?

String
Presence_Type Dialog Reference

The PISCES presence type to add records for

This parameter is only used for adding records. To set affected observation types for removal or transfers, use the subset box

Multiple Value
Return_Updated_Expert_Knowledge_Layer (Optional) Dialog Reference

When this box is checked, PISCES will generate a new Expert Knowledge layer after making the modifications and return it to your table of contents so you can verify that your changes are correct.

Boolean

Code Samples

Tags

add, modify, pisces, data, database, hucs, select, selection, MKS, species, taxa, fish, PISCES

Credits

Use limitations