Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Version published after converting to the new editor

This article describes how data is integrated between nFORM and nCORE for the purposes of both (1) prepopulation of new submissions and (2) population of nCORE data elements from new nFORM submissions (round-tripping)

Integration from nFORM into nCORE

Integration tags are defined in the following database views:

  • nFORMExport.VW_SITE_EXPORT - Imports data from nFORM into nCORE SITE details.
  • nFORMExport.VW_SUBM_EXPORT - Imports data from nFORM into nCORE SUBM details (applications, complaints, etc.).
  • nFORMExport.VW_FEATR_EXPORT - Imports data from nFORM into nCORE FEATR details.
  • nFORMExport.VW_CONTCT_EXPORT - Imports data from nFORM into nCORE CONTCT details.

Document attachments are always imported from an nFORM submission and attached to the Submission record in nCORE. If a description has been provided for the document within the nFORM attachment control, the description will be carried forward into nCORE.

Site Integration into nCORE (including Person and Organization)

nFORM control tag mapping from nFORM to nCORE is defined in nFORMExport.VW_SITE_EXPORT. Integration logic is defined in dbo.SP_nFORM_STG_TO_SUBM_SITE.

Control TagnCORE Target FieldDescriptionUpdates Existing Site?
SITE_IDSITE.SITE_IDPrimary Key. Not Used.No
SITE_NUMSITE.SITE_NUM
No
SITE_NAMESITE.SITE_NAMENote: The inbox shows nFORM-supplied Site Name, but upon importing into nCORE, the nCORE site name is NOT overwritten. It must be manually updated by the internal user if the updated site name is to persist.No
SITE_TYPESITE_TO_REF_SITE_TYPE. REF_SITE_TYPE_CODE

This value is mapped to the Code or Description column from REF_SITE_TYPE.

The row will only be inserted if the same Site Type does not already exist on the Site record.

Only one Site Type is supported per submission.

Yes
SITE_ADDRSITE.(Multiple Address Fields)

Populated from nFORM Address control. Data is parsed from this control into the individual Address fields on the Site Details page:

  • SITE.ADDR_1
  • SITE.ADDR_2
  • SITE.CITY
  • SITE.ZIP_CODE
  • SITE.ADDR_CMNTS (nFORM Location Description field)
  • SITE.REF_STATE_CODE -Tag name is misleading. The nFORM value is mapped to the Description column in REF_STATE
  • SITE.REF_CNTY_CODE - Tag name is misleading. The nFORM value is mapped to the Description column in REF_CNTY. GIS-derived county takes precedent over user-supplied value
  • SITE.REF_CNTRY_CODE - Tag name is misleading. The nFORM value is mapped to the Description column in REF_CNTRY
Yes
SITE_ADDR_CMNTSSITE.ADDR_CMNTSThis is a fallback if nFORM Address control's "Location Description" is not visible and populated.Yes
Contact control tag SITESITE.PREFIXUsed for Person recordsYes
Contact control tag SITESITE.FIRST_NAMEUsed for Person recordsYes
Contact control tag SITESITE.LAST_NAMEUsed for Person recordsYes
Contact control tag SITESITE.ORG_NAMEUsed for Person records (Not displayed on screen!)Yes
Contact control tag SITESITE.EMAILUsed for Person recordsYes
Contact control tag SITEPHONE tableUsed for Person records
SITE_COORDn/aNOT USED. See FEATR mappingn/a
SITE_LATn/aNOT USED. See FEATR mappingn/a
SITE_LONGn/aNOT USED. See FEATR mappingn/a
SITEFEATR_LOC tableWhen tagged on a location (map) nFORM control, the centroid lat/long point will be prepopulated on the submissionNo
SITE_NAICSSITE_TO_REF_NAICS table

This is the numeric NAICS code.

Only one value is supported and the value must be an exact match to the CODE or CODE-DESCR (e.g. "236118" or "236118-Residential Remodelers") in REF_NAICS.

Yes
SITE_SICSITE_TO_REF_SIC table

This is the numeric SIC code.

Only one value is supported and the value must be an exact match to the CODE or CODE-DESCR (e.g. "0131" or "0131-cotton") in REF_SIC.

Yes
SITE_RLTD_SITE_NUMSITE_RLTD_SITE.RLTD_SITE_ID

This is used in conjunction with SITE_RLNSHP_TYPE_DESCR below.

Mapping will only be inserted if both SITE_RLTD_SITE_NUM and SITE_RLNSHP_TYPE_DESCR are supplied and are valid.

No
SITE_RLNSHP_TYPE_DESCRSITE_RLTD_SITE. REF_SITE_RLNSHP_TYPE_CODE

This value is mapped to the Description column from SITE_RLNSHP_TYPE.

This is used in conjunction with SITE_RLTD_SITE_NUM above. Mapping will only be inserted if both SITE_RLTD_SITE_NUM and SITE_RLNSHP_TYPE_DESCR are supplied and are valid.

No
TAX_PARCEL_NUMSITE.TAX_PARCEL_NUMTax Parcel NumberYes
SITE_LUG_NAMESITE.REF_LUG_CODEThis value is mapped to the Description column from REF_LUGYes
SITE_WATERBODY_NAMESITE.REF_WATERBODY_CODEThis value is mapped to the Description column from REF_WATERBODYYes
REF_OWNRSH_TYPE_DESCRSITE.REF_OWNRSH_TYPE_CODEThis value is mapped to the Description column from REF_OWNRSH_TYPEYes
SITE_ALT_NAME+[SITE_ALT_NAME_CODE]SITE_ALT_NAME table

Adds a Site Alternative Name record to the site for the ALT_NAME_CODE specified in the tag name suffix following the + symbol.

If one or more existing Site Alternative Name(s) are found on that site with that same Alt Name Type, whose value differs from the information on the submission, then the previous alternative names will be set to Inactive

Yes

Permits

Section Tag Value = PRMT

A section tagged PRMT should only be included on Permit Change forms or Compliance Schedule forms. Since Permit Change forms (e.g., modifications, renewals) and Compliance Schedules (e.g., annual reports, notifications) are typically used in the context of an existing, in-effect permit, including a PRMT section on these forms provides a convenient way of automatically displaying information about that permit on the form. For example, the permit number and issue date can be displayed at the beginning of the form so that the applicant can confirm that they are filling out the form for the correct permit.

A maximum of one permit can be specified on a form using these tags. The PRMT section should never be marked repeatable. Information about other permits can be collected on the form but the controls for these permits should be given tag values that are not in the reserved list below.

Permit Change forms and Compliance Schedules can also contain site information, but this should be done by using a section tagged SITE containing the appropriate SITE tagged controls.


Tag Name

Data Type

Length

Description

Submission Import Behavior

PRMT_ID

bigint

n/a

Internal Permit unique identifier. Not user editable

If specified, indicates the permit (and site) to which the submission will be related

PRMT_NUM

nvarchar

50

Permit Number

NOT SUPPORTED

PRMT_VERSN

int

n/a

Permit Version

NOT SUPPORTED

REF_PRMT_CATG_DESCR

nvarchar

255

Permit Category

NOT SUPPORTED

REF_PRMT_TYPE_DESCRnvarchar255Permit TypeNOT SUPPORTED

REF_PRMT_STAT_DESCR

nvarchar

255

Permit Status

NOT SUPPORTED

ISSUE_DATE

text

10

Permit Issue Date. Read-only. Only available for prepopulation.
Not imported from a submission into nVIRO

NOT SUPPORTED

EFCTV_DATE

text

10

Permit Effective Date. Read-only. Only available for prepopulation.
Not imported from a submission into nVIRO

NOT SUPPORTED

EXPR_DATE

text

10

Permit Expiration Date. Read-only. Only available for prepopulation.
Not imported from a submission into nVIRO

NOT SUPPORTED

PERMT (contact control)

n/a

n/a

Permittee

Yes. The contact will be created with affiliation type “Permittee” on the submission record,

SITE (contact control)n/an/aSite Address contact control
SITE_CNTYnvarchar510Site County
SITE_ADDR_CMNTSnvarchar4096Site Address Comments
TAX_PARCEL_NUMnvarcharn/aTax Parcel Number
PROJ_NAMEnvarchar510Project name

Submission Integration into nCORE

nFORM control tag mapping is defined in nFORMExport.VW_SUBM_EXPORT. Integration logic is defined in dbo.SP_nFORM_STG_TO_SUBM.

Only one SUBM record is ever associated with a given nFORM submission.

Control TagnCORE Target FieldDescription
CMPLNT_DESCRSUBM.CMPLNT_DESCRComplaint Description
IS_CONF_REQSTDSUBM.IS_CONF_REQSTDnFORM submission value must be YES or NO
CMPLNT_ISSUE_DATESUBM.CMPLNT_DATEJoined with CMPLNT_ISSUE_TIME, if present
CMPLNT_ISSUE_TIMESUBM.CMPLNT_DATEOnly used if CMPLNT_ISSUE_DATE tag is also present
PROJ_NAMESUBM.PROJ_NAMEProject Name
ACTN_TYPESUBM.REF_APP_REQST_ACTN_TYPE_CODE

This value is mapped to the Description column from REF_APP_REQST_ACTN_TYPE.

If not supplied, import will fall back to Form's Action/Deadline setting for mapped nFORM Reason Type.

SUBM_CMNTSSUBM.SUBM_CMNTSSubmission Comments
SUBM_DCSNSUBM_VERSN.REF_DSCN_CODESpecific to schedule submissions. If a matching value is found in the REF_DCSN lookup table, the submission version's Decision will automatically be setto the value supplied. 
SUBM_DCSN_DATESUBM_VERSN.DCSN_DATESpecific to schedule submissions. Sets the Decision Date of the submission version to the value provided. Only populated if a valid SUBM_DSCN is found.
RESUBM_DUE_DATESUBM_VERSN.RESUBM_DUE_DATESpecific to schedule submissions. Sets the Resubmission Due Date of the submission version to the value provided. Only applicable to decision codes NOT_APPROVED and REQ_RESUBM.

Feature Integration into nCORE
Anchor
FormFeatureIntegration
FormFeatureIntegration

nFORM control tag mapping is defined in nFORMExport.VW_FEATR_EXPORT. Integration logic is defined in dbo.SP_nFORM_STG_TO_SUBM_FEATR.

Feature information is gathered from nFORM sections whose control tags are prefixed with the text SITE or FEATR, or contains a Location control. For example, if a control in a section is tagged `FEATR_CARWASH`, the import process will attempt to insert or update a feature. There are no requirements around section tag names for data import; it is based entirely on the section's control data.

The integration logic can only create or update one feature record per section. 

Sections can be repeating to import multiple features.

Inserting versus Updating Features

nCORE will only create new features if a Feature Type is specified in the submission data. The Feature Type can be specified using any of the following methods:

  1. Include a Location control whose label matches an existing Feature Type Description, or
  2. Include a Location control whose tag matches an existing Feature Type Code, or
  3. Include a pre-populated, hidden text control whose default value matches a Feature Type Code or Description, or
  4. Include a single select control whose dropdown values match an existing Feature Type Description.

If an existing Feature is found with a matching FEATR_ID_TXT, the feature will be updated with all fields. If a feature is not found with a matching FEATR_ID_TXT, a new feature will be created upon import.

Control Tagging Rules

Control TagnCORE Target FieldDescription
FEATR_ID_TXTFEATR.FEATR_ID_TXT

Feature Identifier business key (e.g. "001")

FEATR_TYPEFEATR.REF_FEATR_TYPE_CODEnFORM value can match on either CODE or DESCR in REF_FEATR_TYPE.
FEATR_DESCRFEATR.DESCRFeature Description
FEATRFEATR_LOC.(lat/long value)Derived as a point (single lat/long coordinate) from the nFORM location control

Contact Integration into nCORE

nFORM control tag mapping is defined in nFORMExport.VW_CONTCT_EXPORT. Integration logic is defined in dbo.SP_nFORM_STG_TO_SUBM_CONTCT_AFFIL.

Contacts are usually created from nFORM Contact Controls.

The Affiliation Type assigned to the contact upon import is determined when either

  1. The Label value on the nFORM contact control matches a Description from REF_AFFIL TYPE, or 
  2. The nFORM contact control's Tag matches a Code from REF_AFFIL_TYPE
    1. If multiple contact controls in the same section need to map to a single affiliation type, use the "+" sign to add text at the end of the tag to retain uniqueness. For example, a contact control with tag CMPLNT+TEST1 will yield a contact with affiliation type CMPLNT.

A single contact can be assigned multiple affiliations by adding a separate single or multi-select nFORM control with the tag AFFIL in the same section as the contact control.

When the Applicant is also the Site, the contact control may be used to create both (Contact control Label "Applicant" and Contact control Tag = "SITE").  Note: The Site Name comes from contact Company Name / Organization field. Do not use first name/last name.  

Control TagnCORE Target FieldDescription
TypeAFFIL.REF_AFFIL_TYPE_CODEAfter contacts are added to CONTCT, affiliations are inserted into the AFFIL table linking each contact record with 1..many affiliation types matching the REF_AFFIL_TYPE_CODE.
TitleCONTCT.TITLE
prefixNamesCONTCT.PREFIX
formulaCONTCT.CONTCT_NAMEComplex formula using either the company name or a concatenation of first and last names.
firstNameCONTCT.FIRST_NAME
lastNameCONTCT.LAST_NAME
companyNameCONTCT.ORG_NAME
emailCONTCT.EMAIL
phonePHONE.PHONE

Saves the tag mapped to "phone" as the REF_PHONE_TYPE_CODE = "OFFICE" phone. Appears to be for legacy form use only.

Uses FN_FORMAT_PHONE to format the phone number.

phone_0..3PHONE.PHONE

Saves phone_0, phone_1... phone_3 to distinct phone records of different phoneType.

Uses FN_FORMAT_PHONE to format the phone number.

phoneType_0..3PHONE.REF_PHONE_TYPE_CODE

Saves the phoneType of phone_0, phone_1... phone_3 to distinct phone records of different phoneTypes.

  • WHEN phoneType = "BUSINESS" THEN "OFFICE"
  • WHEN phoneType = "MAIN" THEN "OTHER"
  • ELSE phoneType END
extension_0..3PHONE.PHONE_EXTSaves the extension of phone_0, phone_1... phone_3 to distinct phone records of different phoneTypes.
extensionPHONE.PHONE_EXTSaves the tag mapped to "extension" as the REF_PHONE_TYPE_CODE = "OFFICE" phone. Appears to be for legacy form use only.
faxPHONE.PHONESaves with REF_PHONE_TYPE_CODE = "FAX".
streetCONTCT.ADDR_1
street2CONTCT.ADDR_2
localityCONTCT.CITY
areaCodeCONTCT.REF_STATE_CODE
countryCodeCONTCT.REF_CNTRY_CODE
postalCodeCONTCT.ZIP_CODE
countyunmapped
descriptionCONTCT.ADDR_CMNTS

Site Alternate Name Contact Creation
Anchor
Site_Alt_Name_Contact
Site_Alt_Name_Contact

Submission contacts can also be created from a control referencing an nFORM lookup populated from nCORE Site Alternate Name Types. In order for the contact to be created:

  1. The nFORM control must reference an nFORM lookup where the lookup name matches a valid Site Alternate Name Type Code
    1. See the following page for more info on populating an nFORM lookup from Site Alternate Names: Populating nFORM Lookups from nCORE 
  2. The control must map to a valid nCORE Affiliation Type via:
    1. The Label value on the nFORM contact control matches a Description from REF_AFFIL TYPE, or 
    2. The nFORM contact control's Tag matches a Code from REF_AFFIL_TYPE
      1. If multiple contact controls in the same section need to map to a single affiliation type, use the "+" sign to add text at the end of the tag to retain uniqueness. For example, a contact control with tag CMPLNT+TEST1 will yield a contact with affiliation type CMPLNT.
Control TagnCORE Target FieldDescription
TypeAFFIL.REF_AFFIL_TYPE_CODEAfter contacts are added to CONTCT, affiliations are inserted into the AFFIL table linking each contact record with 1..many affiliation types matching the REF_AFFIL_TYPE_CODE.
SITE.TITLECONTCT.TITLE
SITE.PREFIXCONTCT.PREFIX
SITE.SITE_NAMECONTCT.CONTCT_NAME
SITE.FIRST_NAMECONTCT.FIRST_NAME
SITE.LAST_NAMECONTCT.LAST_NAME
SITE.ORG_NAMECONTCT.ORG_NAME
SITE.EMAILCONTCT.EMAIL
SITE.PHONE.PHONEPHONE.PHONE

Copies Phone from site where IS_PRIMRY= 1

SITE.PHONE.REF_PHONE_TYPE_CODEPHONE.REF_PHONE_TYPE_CODE

Copies Phone from site where IS_PRIMRY= 1

SITE.PHONE.PHONE_EXTPHONE.PHONE_EXTCopies Phone from site where IS_PRIMRY= 1
CONTCT.ADDR_1CONTCT.ADDR_1
CONTCT.ADDR_1CONTCT.ADDR_2
CONTCT.CITYCONTCT.CITY
CONTCT.REF_STATE_CODECONTCT.REF_STATE_CODE
CONTCT.REF_CNTRY_CODECONTCT.REF_CNTRY_CODE
CONTCT.ZIP_CODECONTCT.ZIP_CODE
SITE_ALT_NAME_TYPE.DESCR + ': ' + SITE_ALT_NAME.SITE_NAMECONTCT.ADDR_CMNTSCopies referenced Site Alternative Name to the Contact Comments.

Integration from nCORE into nFORM (prepopulation)

Prepopulation from nCORE into nFORM is accomplished through nFormImport.SOURCE_[SUFFIX] views where the view name suffix indicates the section tag to populate.

Prerequisite 

To prepopulate forms, Pre-fill → Import from External Source (SQL) must be checked:

Section Tag should be set to view name suffix of the source name eg. (SITE, PRMT, or FEATR, )


Available sources are: 

Sites
Anchor
Sites
Sites

Populated from view: nFormImport.SOURCE_SITE

This view may also pre-populate a contact control (e.g., for a Person or Org) by using "SITE" as the contact control tab.

Available standard data for pre-population in a section tagged SITE are:

TagNameControl TypeNotes
SITE_NUMSite NumberText Control
SITE_NAMESite NameText Control
SITESite LocationLocation ControlThis will populate a location control with site coordinates
SITE_ADDR

Site Address

Contact ControlThis will populate contact control or Address control tagged SITE_ADDR
SITE_CNTYSite CountyText Control
SITE_ADDR_CMNTSSite Address CommentsParagraph Control
TAX_PARCEL_NUMTax Parcel NumberText Control
REF_OWNRSH_TYPE_DESCROwnership TypeText Control
SITE_LUG_NAMESite Lug NameText Control
SITE_WATERBODY_NAMESite Waterbody NameText Control
SITE_SICSite SIC CodesText Control

Any control that supports binding to dynamic datasource. Set up the control to use the SIC_CODES datasource.

The binding assumes dbo.REF_SIC.CODE = nform.LOOKUP_VALUE.NAME

SITE_NAICSSite NAICS CodesText Control

Any control that supports binding to dynamic datasource. Set up the control to use the NAICS_CODES datasource.

The binding assumes dbo.REF_NAICS.CODE = nform.LOOKUP_VALUE.NAME

Submissions
Anchor
Submissions
Submissions

Populated from view: nFormImport.SOURCE_SUBM

This view is primarily used for:

  • Populating data about the submission's parent Schedule
  • Populating the Alternate Identity in the Submission Header
  • Schedule Due Date (that should typically be set to Read Only when populated)
  • Schedule Name (see Notes below on what it contains)

Available standard data for pre-population in a section tagged SUBM are:

TagNameControl TypeNotes
SUBM_REF_NUMSubmission NumberText Control
SCHD_DUE_DATESchedule Due DateDate Control
SCHD_NAMESchedule NameText ControlIf there is a Custom name then that takes the priority over Schedule type name.

Populating the Alternate Identity with the nCORE-generated submission number

The nCORE source view nFormImport.SOURCE_SUBM can be used to populate the nCORE-generated submission number into the nFORM Alternate Identity, making this available on the Submission Wizard Header and Submission Summary screen:

  1. Create a new section (or use an existing section), and tag it SUBM, and enable it for prefill
  2. Create a new short-text control tagged SUBM_REF_NUM and make it "Read Only"
  3. At the form version level in the "Details" Section, check box "Activate Display of Alternate Submission Identifier"
  4. Check newly-displayed box "Override Display Label", and enter label of your choice 
Warning
titleMiWaters - Do Not Use!

This paradigm should not be used in MiWaters forms that require a fee, as the Alternative Identity stores the Hotkey for fee receipt


Permits
Anchor
Permits
Permits

Populated from view:  nFormImport.SOURCE_PRMT

Available standard data for pre-population in a section tagged PRMT are:

TagNameControl TypeNotes
SITE_NAMESite NameText Control
SITE_NUMSite NumberText Control
PRMT_NUMPermit NumberText Control
PRMT_VERSNPermit NumberText Control
PRMT_NUM_ALTAlternative Permit NumberText Control
REF_PRMT_CATG_DESCRPermit CategoryText Control
REF_PRMT_TYPE_DESCRPermit TypeText Control
REF_PRMT_STAT_DESCRPermit StatusText Control
ISSUE_DATEPermit Issue DateDate Control
EFCTV_DATEPermit Effective DateDate Control
EXPR_DATEPermit Expiration DateDate Control
PERMTPermittee InformationContact ControlThis will populate a contact control with Permittee details
PERMT_NAMEPermittee NameText ControlPopulates the "Contact Name" from the permit's permittee. Note that this will not create a contact when submission is imported back into nCORE.
SITESite CoordinatesLocation ControlThis will populate a location control tagged SITE
SITE_ADDRSite AddressContact ControlThis will populate contact control or Address control tagged SITE_ADDR
SITE_CNTYSite CountyText Control
SITE_ADDR_CMNTSSite Address CommentsParagraph Control
TAX_PARCEL_NUMTax Parcel NumberText Control
PROJ_NAMEProject NameText Control

Features
Anchor
Features
Features

Populated from view:  nFormImport.SOURCE_FEATR

Feature data can be filtered for prefill/autofill into nFORM Submissions by using a special Tag syntax on the Section where the feature type code to filter for is suffixed onto the tag after a dollar sign. For example Tag FEATR$FOO would filter only for features of feature type code FOO. 

Available standard data for pre-population in a section tagged FEATR are:

TagNameControl TypeNotes
DATASET_NAMEDataset NameText Control
FEATRFeature Location CoordinatesLocation ControlLocation coordinate used with a location control
FEATR_DESCRFeature DescriptionText Control, Paragraph Control
FEATR_ID_TXTFeature IDText Control
FEATR_TYPEFeature TypeText Control


On this page

Table of Contents


Sub-Topics

Page Tree
root@self


Related Content