42 views

Description

The transform map option "Enforce mandatory fields" is not working as expected. Imported records missing mandatory data are processed without error. When "All fields" is selected, if the source file is missing data, an error should occur.

Steps to Reproduce

  1. Create a data source with the following settings:

    • Type: File
    • Format: Excel (.xlsx/.xls)
    • File retrieval method: Attachment source: a spreadsheet with columns
  2. Attach a source .xlsx file that has three fields (u_serial_number, u_model_number , u_model_category).

    Note: Only u_serial number is set to "A000055" but both mandatory fields u_model_number and u_model_category are EMPTY in the spreadsheet. 

    • Model category = empty
    • Model number = empty
    • Serial number = A000055
  3. Create a transform map with the following settings:

    • Active = true
    • Run business rules = true
    • Enforce mandatory fields: All fields
    • Copy empty fields = false
    • Target table: Hardware [alm_hardware]
    • Field Maps:
      • Source field > Target field = Coalesce
      • u_model_number > model = false
      • u_model_category > model_category = false
      • u_serial_number > serial_number = true
  4. Run transform the record inserted to alm_hardware without error.

 

Workaround

Set the glide.impex.transformer.empty_value_nil property to true and re-import.

This will import empty fields not as the glide reserved keyword "NULL" but as "" (Empty string).


Related Problem: PRB1266847

Seen In

There is no data to report.

Intended Fix Version

Madrid

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-08-08 16:59:21
Published:2018-05-03