0

I am currently dealing with migration from Lotus Notes to Sharepoint 2010. I have a single line of text column in my SP list which looks like this "Chemical, Petrochemicals, Fertilisers;#Financial Management;#Mining;#Oil & Gas;#Power;#Treasury Operations"

Is there a way I convert it to Choice field so I can select multiple choices where the choices are the ones followed by ";#" tag. Thanks in advance!

1

Not quite sure what you mean, but I'm guessing you have at least one item in your list with the values you explain, set to a field of type Text.
If this is the case you can convert the field to MultiChoice through PowerShell, like this:

$field = $list.Fields.GetFieldByInternalName("MyField")
$field.Type = "MultiChoice"
$field.Update()

You also have to add the values as choices.
If you want to select all values in all items from the column do this:

$values = ($list.Items | % { $_["MyField"] }) -join ";#" -split ";#" | Get-Unique
$field = $list.Fields.GetFieldByInternalName("MyField") 
$values | % {
  $field.Choices.Add($_) 
}
$field.Update()
| improve this answer | |
  • Thanks for the response. The item I shared is a sample one and I have multiple items with similar values inside the column that is currently a single line of text. Will this work in such case? – user25284 Apr 21 '14 at 19:16
  • I also would like to populate the choice fields automatically instead of adding them manually – user25284 Apr 21 '14 at 19:19
  • Updated the answer to get all distinct values from all items, see $values = ... – eirikb Apr 21 '14 at 19:28
0

The larger thing to consider is where this content will live. Are these going to be tags associated in a managed metadata term set or are these going to just be choice options?

In either case, you'd want to get a distinct list of these terms and either import them into managed metadata or create them as list items in a centralized list. The library where you are importing these pages would then have a managed metadata column or lookup column.

Then when migrating content, you break apart each tag in your source document and find the corresponding term(s) in either your managed metadata term set or separate list.

| improve this answer | |
0

Why not just create the choice field and import existing data via data sheet view or is that not possible in your situation?

Could you provide more details on what you're doing?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy