This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Migrate column with boolean to number content in a list/library

I migrate a list with a column that contains 2 different types (source = boolean ; target = number). Is there a possibility to transform the boolean value to a defined number?

Parents
  • Hi Frank,

     

    You may do the following:

     

    1. Make sure to enable the Advanced Mode on the Settings tab of the Content Matrix Console.

    2. On the job configuration window, click the Transformations tab.

    3. On the Available Definitions section, select SharePoint Items.

    4. Click Add Transformer and select Invoke PowerShell Script.

    5. On the Configure PowerShell Transformer dialog window, click on the Transform tab, and the select Use Configured Script.

    6. Copy and paste the script below, and then click OK.

     

    if ($dataObject["BooleanField"] -eq $True)

    {

      $dataObject["NumberField"] = 1

    else

    {

      $dataObject["NumberField"] = 0

    }

     

    7. Run the migration job.

     

    Note: 

    - Replace BooleanField and NumberField in the script accordingly. 

    - You may also specify a different value for the NumberField.

     

    I hope this helps.

     

     

    Regards,

    Cyrus

Reply
  • Hi Frank,

     

    You may do the following:

     

    1. Make sure to enable the Advanced Mode on the Settings tab of the Content Matrix Console.

    2. On the job configuration window, click the Transformations tab.

    3. On the Available Definitions section, select SharePoint Items.

    4. Click Add Transformer and select Invoke PowerShell Script.

    5. On the Configure PowerShell Transformer dialog window, click on the Transform tab, and the select Use Configured Script.

    6. Copy and paste the script below, and then click OK.

     

    if ($dataObject["BooleanField"] -eq $True)

    {

      $dataObject["NumberField"] = 1

    else

    {

      $dataObject["NumberField"] = 0

    }

     

    7. Run the migration job.

     

    Note: 

    - Replace BooleanField and NumberField in the script accordingly. 

    - You may also specify a different value for the NumberField.

     

    I hope this helps.

     

     

    Regards,

    Cyrus

Children
No Data