none
How do you remove a custom list?

    Pergunta

  • I have created a list in the authoring tool that i was using for a configuration class i've created, i no longer need this list as i have found a better way. But annoyingly i cannot seem to remove the list.

    Is there way of easily doing this?

    sexta-feira, 15 de junho de 2012 08:02

Respostas

  • Not a problem. You're right, lists can be referenced in a few places within a single MP. The most reliable method for removing them is to remove the actual <EnumerationValue> nodes, then import the MP. Continue to remove the nodes referenced by the error until the mp imports successfully :) But, it's also the most time consuming. So, here's what to look for:

    Your list is defined in the <EnumerationTypes> node. Each <EnumerationValue> under <EnumerationTypes> represents one of two things: The parent list, or a list item. Basically, you'll want to take note of the ID for each <EnumerationValue> you want to remove from your MP. In your MP, do a search those IDs, removing each node that references them.

    Generally, you'll find enumerations reference in the following areas: Categories, DisplayStrings, and class properties. Categories and properties reference list parents while display strings can reference both list parents and list items.

    For example, an EnumerationValue has an ID "MyTestList". When you search for MyTestList, you'll probably find a <DisplayString> node like: <DisplayString ElementID="MyTestList">. You'll want to remove that whole <DisplayString> node (including the <Name> and <Description> child nodes, if they exist).

    As another example, lists are often referenced in categories to faciliate console features (such as making the list visible to users in the console). Typically there are two categories for each list..when I say there are two, I mean there are two <Category> nodes that target your list. For example:

    <Category ID="someCategoryID" Target="MyTestList"... />
    <Category ID="someOtherCategoryID" Target="MyTestList"... />

    Just remove both of those categories (again, if they exist).

    Another place they can be reference, of course, is in a class property. If your MP is unsealed, simply remove the property that uses the list. You'll find your list in the <Property> node's "EnumType" attribute..eg: <Property ID="myListProperty" ... EnumType="MyTestList" />. If your MP is sealed, that's a little trickier. Class properties cannot be removed from sealed MPs. The only way to remove the property is to delete the MP from service manager, remove the property, reseal the MP, then reimport it.

    Let me know if that's clear or just made things more confusing!

    • Marcado como Resposta Andrew France sexta-feira, 15 de junho de 2012 13:39
    sexta-feira, 15 de junho de 2012 13:17

Todas as Respostas

  • I think you'll have to remove it from the MP by hand. I don't see anything in the authoring tool to remove lists. Is that what you're trying to do? If so, I'll walk you through the process..it's not bad, there are just a few things you'll have to remove.

    sexta-feira, 15 de junho de 2012 11:45
  • Hey Aaron,

    Yep that's exactly what i was trying to do, shame it's not possible. I had a look in the MP, normally it's pretty simple to cut stuff, but for the list there seemed to be a few places where it's mentioned so made it a little more daunting.

    If you could give me some pointers that'll be great. In fact I've remade the MP so it's totally safe to mess about with the old one, a good lesson to learn for the future :-)

    sexta-feira, 15 de junho de 2012 12:36
  • Not a problem. You're right, lists can be referenced in a few places within a single MP. The most reliable method for removing them is to remove the actual <EnumerationValue> nodes, then import the MP. Continue to remove the nodes referenced by the error until the mp imports successfully :) But, it's also the most time consuming. So, here's what to look for:

    Your list is defined in the <EnumerationTypes> node. Each <EnumerationValue> under <EnumerationTypes> represents one of two things: The parent list, or a list item. Basically, you'll want to take note of the ID for each <EnumerationValue> you want to remove from your MP. In your MP, do a search those IDs, removing each node that references them.

    Generally, you'll find enumerations reference in the following areas: Categories, DisplayStrings, and class properties. Categories and properties reference list parents while display strings can reference both list parents and list items.

    For example, an EnumerationValue has an ID "MyTestList". When you search for MyTestList, you'll probably find a <DisplayString> node like: <DisplayString ElementID="MyTestList">. You'll want to remove that whole <DisplayString> node (including the <Name> and <Description> child nodes, if they exist).

    As another example, lists are often referenced in categories to faciliate console features (such as making the list visible to users in the console). Typically there are two categories for each list..when I say there are two, I mean there are two <Category> nodes that target your list. For example:

    <Category ID="someCategoryID" Target="MyTestList"... />
    <Category ID="someOtherCategoryID" Target="MyTestList"... />

    Just remove both of those categories (again, if they exist).

    Another place they can be reference, of course, is in a class property. If your MP is unsealed, simply remove the property that uses the list. You'll find your list in the <Property> node's "EnumType" attribute..eg: <Property ID="myListProperty" ... EnumType="MyTestList" />. If your MP is sealed, that's a little trickier. Class properties cannot be removed from sealed MPs. The only way to remove the property is to delete the MP from service manager, remove the property, reseal the MP, then reimport it.

    Let me know if that's clear or just made things more confusing!

    • Marcado como Resposta Andrew France sexta-feira, 15 de junho de 2012 13:39
    sexta-feira, 15 de junho de 2012 13:17
  • Thanks Aaron makes perfect sense :-)
    sexta-feira, 15 de junho de 2012 13:39