Updating a managed metadata column from choice column value

I am trying loop through
all lists in a web, and for each list, 
1. create a managed metadata column->Working
2.
Pull value from choice column->Working
3. Move
choice column value to managed metadata column->Not Working
Point number 3 is not working. Please advise
Here is the code:
static void Main(string[] args)
//Pulling the rootweb of the Site
const string SPLocationListColumn = "CHECK6";
SPSite site = new SPSite("http://sp2010:8080");
SPWeb rootweb = site.RootWeb;
//Setting up the taxonomy terstore, termset and term
Microsoft.SharePoint.Taxonomy.TaxonomySession taxonomySession = new Microsoft.SharePoint.Taxonomy.TaxonomySession(site);
TermStore termStore = taxonomySession.TermStores["Managed Metadata Service"];
Console.WriteLine(termStore.Name);
Group group = termStore.Groups["KM Metatags"];
Console.WriteLine(group.Name);
TermSet termSet = group.TermSets["Document Classification"];
Guid termsetid = termSet.Id;
Console.WriteLine(termSet.Name);
Term term = termSet.Terms["Document subclassification"];
TermCollection terms = termSet.Terms;
Console.WriteLine(term.Name);//Looping through all webs of the input website
SPWebCollection collWebsite = site.AllWebs;
for (int i = 0; i < collWebsite.Count; i++)
using (SPWeb oWebsite = collWebsite[i])
//Looping through all lists in web
SPListCollection collList = oWebsite.GetListsOfType(SPBaseType.DocumentLibrary); ;
for (int j = 0; j < collList.Count; j++)
SPList list = collList[j];//if the list name is Documents, create a new field of MMS type
if (list.Title == "Documents")
Console.WriteLine(list.Title);
TaxonomyField field = list.Fields.CreateNewField("TaxonomyFieldType", SPLocationListColumn) as TaxonomyField;
field.SspId = termSet.TermStore.Id;
Console.WriteLine(termSet.TermStore.Id);
field.TermSetId = termSet.Id;
Console.WriteLine(termSet.Id);
field.AnchorId = Guid.Empty;
try
{//Add the newly added MMS field to default view
Console.WriteLine("Entering");
Console.WriteLine("Entering");
list.Fields.Add(field);
Console.WriteLine("Entering");
Console.WriteLine("Entering1");
SPView view = list.DefaultView;
Console.WriteLine("Entering2");
list.Update();
SPViewFieldCollection collViewFields = view.ViewFields;
collViewFields.Add("CHECK6");
Console.WriteLine("Entering3");
view.Update();
Console.WriteLine("Entering4");
catch (Exception e1)
Console.WriteLine(e1.Message);
}//Capture a choice field by name subclass and move it to the newly added MMS field
for (int f = 1; f < list.ItemCount; f++)
if (list.Title == "Documents")
Console.WriteLine(list.Title);
SPListItem item = list.Items[f];
if (item.Fields.ContainsField("subclass"))
SPField field9 = item.Fields["subclass"];
String subclassvalue = field9.GetFieldValueAsText(item["subclass"]);
Console.WriteLine(subclassvalue);
TaxonomyField taxonomyField = item.Fields["CHECK6"] as TaxonomyField;
TaxonomyFieldValue taxonomyFieldValue = new TaxonomyFieldValue(taxonomyField);
taxonomyFieldValue.TermGuid = term.Id.ToString();
taxonomyFieldValue.Label = subclassvalue;
taxonomyField.Update();
item.Update();
list.Update();

From here:
http://www.c-sharpcorner.com/uploadfile/anavijai/programmatically-set-value-to-the-taxonomy-field-in-sharepoint-2010/
taxonomyFieldValue.TermGuid = term.Id.ToString();
taxonomyFieldValue.Label = term.Name;
SPListItem item = list.Items.Add();
# item["Title"] ="Sample";
item["TaxonomyField"] = taxonomyFieldValue;
item.Update();
list.Update();
it appears you're missing the point where you assign that taxonomyFieldValue to the item's taxonomy field in question.

Similar Messages

  • Managed Metadata appearing in wrong columns after Restoring a site to a new Site Collection

    I've restored a site with some libraries that have Managed Metadata (MM) columns from one site collection into another site collection inside the same web app so it should all subscribe to the same Managed Metadata
    Service Application.
    There are two MM columns in one library, one holds a single value which is what type of document it is, the other is a general tag field that allows the user to add multiple MM values to it if they want.
    What we've found  is that data has randomly disappeared on some MM fields, on others it appears in the wrong column, and in other cases it appears fine.
    I used native out of the box GUI backup and restored with the command line,
    I've done it twice with the same result, so it’s not a one off corruption during backup. It's the same story in a different doc library based on different term sets as well. 
    Of all the things to not work properly, MM was probably last on my list to expect, it's knocked my confidence in it a bit, as well as worried me about future upgrades.
    If anyone has any ideas over what may be the cause of this, it would be appreciated, I've read lots of blogs, but nothing quite like this has cropped up.
    Thanks,
    Jon

    Most of the ISV offerings will allow you to 'Migrate' content from one SP location to another. I'm pretty sure AvePoint and a few others have tools specifically developed for shifting bits and pieces around SharePoint farms.
    It is a limitation but the ISV tools tend to do a good job and maintain nearly full consistency.
    There's scripts around that can do much/most of the migration and you could always extend them to do the same things as the ISV migration tools however the cost to do so can quickly get to the same ballpark as buying an already made tool.
    Paul is also in the London office, we often work together when projects requiring his brains and my beauty crop up.

  • SQL update one column from another column

    I'm looking for a way to update a SQL column with a portion
    of info from another column in the same table.
    example of a sql command
    UPDATE table1
    SET table1.columnname1 = table1.columnname2
    FROM table
    WHERE blah blah blah
    Here's the thing... I only need a portion of the data found
    in the source column. I'm not sure how I would do this then.
    for example, the database has countries and states combined
    into one column like this 'US-DC', 'US-CA', US-FL', etc. I want to
    separate these into two columns, a country column and a state
    column.... and I dont want to go though all the results and do this
    line by line. How would I write the SQL command so that it puts
    just the country in the country column, and puts just the state in
    the state column, and it omits the dash all together.
    any ideas?

    It depends. Are you using PHP and mySQL or ASP and SQL?
    If you are using mysql and PHP you could use the following
    code to loop through all records in your datatbase.
    $sql="SELECT * FROM tablename"; //SET tablename to the name
    of your database table.
    $result=mysql_query($sql)or die(mysql_error(). " - $sql");
    for($x = 0; $row=mysql_fetch_assoc($result); $x++){
    //set up the variables from the table
    $ID=$row['ID']; //this is the primary key
    $var1=$row['contrystatecolumn']; //this is the name of the
    column which holds the country-state
    $var2=explode("-", $var1); //now we explode the string to get
    the country and the state seperated and place the results into an
    array
    $country=$var2[0]; //this is the first piece of the exploded
    string in the array
    $state=$var2[1]; //this is the second piece of the exploded
    string in the array
    //now we update the database record with the new information
    //remember to replace the tablename with your actual table
    name and the columns country and state with the acutal names of
    your columns in your table
    $sql2="UPDATE tablename SET country='$country'.
    state='$state' WHERE ID='$ID'";
    $result2=mysql_query($sql2)or die(mysql_error() . " -
    $sql2");
    This code will loop through every record in your table and do
    what you want very quickly.
    Hope this helps
    Stan Forrest
    Senior Web Developer
    ATG Internet

  • Import List Items with Managed Metadata Field from CSV File

    Hello,
    I try to import list items from a CSV File. Most of the fields are populating correctly except the Managed Metadata Field. I found multiple examples on how to set Managed Metadata Fields with Powersehll, but unfortunately I couldnt get it running.
    The CSV File holds values for the Metadata Column, this value should be checked against the Metadata in the Termstore. If this Term is existent, then it should set the fields value, if it is not existant then it should add the term from the CSV File to the
    Term Set in the Term Store. Can anybody give me a tip on how to do this? This is what I have, where Line 4 holds the Metadata:
    $Siteurl = "http://siteUrl"
    $Rootweb = New-Object Microsoft.Sharepoint.Spsite($Siteurl);
    $Webapp = $Rootweb.Webapplication
    $listName = "Catalogue"
    $listWeb = Get-SPWeb $Siteurl
    $list = $listWeb.Lists[$listName]
    $pfad1 = "c:\temp\Servers.csv"
    $content = import-csv -Delimiter ";" -Path $pfad1 
    foreach ($line in $content) {
    $newItem = $list.Items.Add()
    $newItem["Field 1"] = $line.1
    $newItem["Field 2"] = $line.2
    $newItem["Field 3"] = $line.3
    $newItem["Field 4"] = $line.4
    $newItem.Update()
    write-host $line.Title imported
    Thanks!!

    Hi Jimmie,
    From your description, when importing list from csv to SharePoint site, you would like to compare if Managed Metadata column exists in term store, and return yes value, if not, add it to term store.
    That might need script to achieve. You need to import list at first, then get value from term store, and compare with the list. Change the list field per comparison result, then add new value to term store.
    However, there might some workaround to meet your requirement. Not surly understand, so I find some references for you:
    If you would like to export Term Set to CSV from SharePoint 2013, then you could compare it:
    http://gallery.technet.microsoft.com/office/PowerShell-for-SharePoint-a838b5d0#content
    If you would like to query SharePoint 2013 Managed metadata term store using JavaScript:
    http://sharepoint.stackexchange.com/questions/60045/query-sp2013-managed-metadata-term-store
    http://stackoverflow.com/questions/13858962/getting-all-the-term-stores-in-sharepoint-2010-web-services-or-client-side-obje
    If you would like to synchronize, import or copy term store & managed metadata in SharePoint between environments:
    http://www.matthewjbailey.com/synchronize-import-or-copy-term-stores-managed-metadata-in-sharepoint/
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Update table a columns using columns from table b (values of 2 columns of table b need to taken from table c)

    Guys,
    I need to update table A columns col3, col4, col5 and col6 by table b columns col3, col4, col5 and col6 however table b col5 and col6 values need to come from table c col1.
    Means table b col5 and col6 have values in it however i need to replace them with value from table c col1 and need to update table a col5 and col6 accordingly.
    table a and table b has col1 and col2 in common.
    i am trying something like this.
    Update a
    a.col3 = b.col3,
    a.col4 = b.col4,
    a.col5 = (select col1 from table_c c where c.col2=b.col5),
    a.col6 = (select col1 from table_c c where c.col2=b.col6)
    from table_A a inner join table_b
    on  a.col1=b.col1 and a.col2=b.col2
    can someone help me reframe above update query?
    thanks in advance for your help.

    Try the below:(If you have multiple values, then you may need to use TOP 1 as commented code in the below script)
    create Table tableA(Col1 int,Col2 int,Col3 int,Col4 int,Col5 int,Col6 int)
    Insert into tableA values(1,2,3,4,5,6)
    create Table tableB(Col1 int,Col2 int,Col3 int,Col4 int,Col5 int,Col6 int)
    Insert into tableB values(1,2,30,40,50,60)
    create Table tableC(Col1 int,Col2 int,Col3 int,Col4 int,Col5 int,Col6 int)
    Insert into tableC values(100,50,30,40,2,2)
    --Insert into tableC values(200,50,30,40,2,2)
    Insert into tableC values(100,60,30,40,2,2)
    Select * From tablea
    Update a Set
    a.col3 = b.col3,
    a.col4 = b.col4,
    a.col5 = (select col1 from tablec c where c.col2=b.col5 ),
    a.col6 = (select col1 from tablec c where c.col2=b.col6 )
    from tableA a inner join tableb b
    on a.col1=b.col1 and a.col2=b.col2
    --Update a Set
    --a.col3 = b.col3,
    --a.col4 = b.col4,
    --a.col5 = (select Top 1 col1 from tablec c where c.col2=b.col5 Order by c.Col1 asc),
    --a.col6 = (select Top 1 col1 from tablec c where c.col2=b.col6 Order by c.Col1 asc)
    --from tableA a inner join tableb b
    --on a.col1=b.col1 and a.col2=b.col2
    Select * From tablea
    Drop table tablea,Tableb,TableC

  • How can I Derive columns from derived columns? Is it possible?

    I am learning SQL on the job at the moment working on application express. But have hit a problem. As you can see below I have 3 tables ATTENDING, EVENTS and BUDGET, in the select statement below I have 2 derived columns but I would like to add SUM(Related_Expenses+ Course_Expenses) for each row. How is this possible?
    SELECT
    BUDGET.BUDGET_ID,
    BUDGET.BUDGET_TYPE,
    BUDGET.ALLOCATION,
    (select
    NVL(SUM(EVENTS.ORDER_AMMOUNT),0)
    from EVENTS, C_YEAR
    where EVENTS.BUDGET_ID = BUDGET.BUDGET_ID
    and EVENTS.YEAR = C_YEAR.YEAR
    ) as Course_Expenses,
    ( select
    NVL(SUM(NVL(ATTENDING.ACCOMADATION_BT_AMOUNT,ATTENDING.ACCOMODATION_ESTIMATE)),0)+
    NVL(SUM(NVL(ATTENDING.TRAVEL_BT_AMOUNT,ATTENDING.TRAVEL_BOOKED_ESTIMATE)),0)+
    NVL(SUM(NVL(ATTENDING.TRAVEL_OTHER_CLAIM,ATTENDING.TRAVEL_OTHER_ESTIMATE)),0)+
    NVL(SUM(NVL(ATTENDING.SUBSISTENCE_CLAIM,ATTENDING.SUBSISTENCE_ESTIMATE)),0)
    from EVENTS, ATTENDING
    where ATTENDING.EVENT_ID = EVENTS.EVENT_ID
    and EVENTS.BUDGET_ID = BUDGET.BUDGET_ID
    and EVENTS.YEAR = C_YEAR.YEAR
    ) as Related_Expenses
    from BUDGET, C_YEAR
    where BUDGET.YEAR = C_YEAR.YEAR

    Select yb.budget_id,
           yb.budget_type,
           yb.allocation,
           (yb.course_expenses + yb.related_expenses) total_expenses
      From (SELECT BUDGET.BUDGET_ID,
                   BUDGET.BUDGET_TYPE,
                   BUDGET.ALLOCATION,
                   (select NVL(SUM(EVENTS.ORDER_AMMOUNT),0)
                      from EVENTS, C_YEAR
                     where EVENTS.BUDGET_ID = BUDGET.BUDGET_ID
                       and EVENTS.YEAR = C_YEAR.YEAR) as Course_Expenses,
                   (select NVL(SUM(NVL(ATTENDING.ACCOMADATION_BT_AMOUNT,ATTENDING.ACCOMODATION_ESTIMATE)),0)+
                           NVL(SUM(NVL(ATTENDING.TRAVEL_BT_AMOUNT,ATTENDING.TRAVEL_BOOKED_ESTIMATE)),0)+
                           NVL(SUM(NVL(ATTENDING.TRAVEL_OTHER_CLAIM,ATTENDING.TRAVEL_OTHER_ESTIMATE)),0)+
                           NVL(SUM(NVL(ATTENDING.SUBSISTENCE_CLAIM,ATTENDING.SUBSISTENCE_ESTIMATE)),0)
                      from EVENTS, ATTENDING
                     where ATTENDING.EVENT_ID = EVENTS.EVENT_ID
                       and EVENTS.BUDGET_ID = BUDGET.BUDGET_ID
                       and EVENTS.YEAR = C_YEAR.YEAR) as Related_Expenses
               from BUDGET, C_YEAR
              where BUDGET.YEAR = C_YEAR.YEAR) yb

  • Defining 100 columns from single column

    hi all,
    i need to write an sp which returns many columns
    i have code ,name,candidates,mark(0-100)
    these are my columns in a table..
    now i need to calculate columns 0-100 which mark having how many students..like
    code name     [ MARKS- 1]                        [MARK- 2]       [
    3]        [ 4]      [5 ]  -----------[100]
    01   eng          10CANDIDATES                    2                
    10          64         44--------------98
    02   BEG          12CANDIDATES                   0                 
    12          77         98                  21
    FOR THIS I WROTE CODE LIKE
    SELECT Name,Code,Mark,CANDIDATES
    INTO #tmp
    FROM TABLENAME
    WHERE (CONDITION)
    SELECT
    Name,Code
    ,[1] = SUM(CASE WHEN Mark=1 THEN Nos ELSE 0 END)
    ,[2] = SUM(CASE WHEN Mark=2 THEN Nos ELSE 0 END)
    ,[3] = SUM(CASE WHEN Mark=3 THEN Nos ELSE 0 END)
    ,[4] = SUM(CASE WHEN Mark=4 THEN Nos ELSE 0 END)
    ,[5]= SUM(CASE WHEN Mark=5 THEN Nos ELSE 0 END)
    ,[6] = SUM(CASE WHEN Mark=6THEN Nos ELSE 0 END)
    ,[7] = SUM(CASE WHEN Mark=7 THEN Nos ELSE 0 END)
    ,[8]= SUM(CASE WHEN Mark=8 THEN Nos ELSE 0 END)
    ,[9]= SUM(CASE WHEN Mark=9 THEN Nos ELSE 0 END)
    ,[10]= SUM(CASE WHEN Mark=10 THEN Nos ELSE 0 END)
    ---SO ON UPTO 100---------------------------------------------
    FROM #tmp
    GROUP BY Name,Code
    NOW ITS too big code to define upto 100, so how caan i define in easiest way like any loop way? and simple code..pls help
    thanks in advance..
    lucky

    hi all,
    i need to write an sp which returns many columns
    i have code ,name,candidates,mark(0-100)
    these are my columns in a table..
    now i need to calculate columns 0-100 which mark having how many students..like
    code name     [ MARKS- 1]                        [MARK- 2]       [
    3]        [ 4]      [5 ]  -----------[100]
    01   eng          10CANDIDATES                    2                
    10          64         44--------------98
    02   BEG          12CANDIDATES                   0                 
    12          77         98                  21
    FOR THIS I WROTE CODE LIKE
    SELECT Name,Code,Mark,CANDIDATES
    INTO #tmp
    FROM TABLENAME
    WHERE (CONDITION)
    SELECT
    Name,Code
    ,[1] = SUM(CASE WHEN Mark=1 THEN Nos ELSE 0 END)
    ,[2] = SUM(CASE WHEN Mark=2 THEN Nos ELSE 0 END)
    ,[3] = SUM(CASE WHEN Mark=3 THEN Nos ELSE 0 END)
    ,[4] = SUM(CASE WHEN Mark=4 THEN Nos ELSE 0 END)
    ,[5]= SUM(CASE WHEN Mark=5 THEN Nos ELSE 0 END)
    ,[6] = SUM(CASE WHEN Mark=6THEN Nos ELSE 0 END)
    ,[7] = SUM(CASE WHEN Mark=7 THEN Nos ELSE 0 END)
    ,[8]= SUM(CASE WHEN Mark=8 THEN Nos ELSE 0 END)
    ,[9]= SUM(CASE WHEN Mark=9 THEN Nos ELSE 0 END)
    ,[10]= SUM(CASE WHEN Mark=10 THEN Nos ELSE 0 END)
    ---SO ON UPTO 100---------------------------------------------
    FROM #tmp
    GROUP BY Name,Code
    NOW ITS too big code to define upto 100, so how caan i define in easiest way like any loop way? and simple code..pls help
    thanks in advance..
    lucky
    Please post the create table script and sample data.
    - please mark correct answers

  • Access datagrid column from another column

    Hello
    Basically, I have 2 columns in a DataGrid, both with CheckBox itemRenderers.
    When I check the first checkbox, I want the second to be enabled = false.  I'm stuck.
    Thanks!

    This answers your question:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.ListEvent;
          import mx.collections.ArrayCollection;
          [Bindable] private var ac:ArrayCollection = new ArrayCollection([
            {oneSelected: false, twoSelected: false, twoEnabled: true},
            {oneSelected: false, twoSelected: false, twoEnabled: true},
            {oneSelected: false, twoSelected: false, twoEnabled: true},
            {oneSelected: false, twoSelected: false, twoEnabled: true}
          public function changeEnabled(evt:ListEvent):void{
            var origData:Object = ac.getItemAt(evt.rowIndex);
            origData.twoEnabled = origData.twoEnabled == false?true:false;
            ac.setItemAt(origData, evt.rowIndex);
        ]]>
      </mx:Script>
      <mx:DataGrid dataProvider="{ac}" itemClick="changeEnabled(event)">
        <mx:columns>
          <mx:DataGridColumn dataField="oneSelected">
            <mx:itemRenderer>
              <mx:Component>
                <mx:CheckBox selectedField="oneSelected"
                  change="onChange(event);" label="">
                  <mx:Script>
                    <![CDATA[
                      private function onChange(evt:Event):void {
                        data.oneSelected = !data.oneSelected;
                    ]]>
                  </mx:Script>
                </mx:CheckBox>
              </mx:Component>
            </mx:itemRenderer>
          </mx:DataGridColumn>
          <mx:DataGridColumn dataField="twoSelected">
            <mx:itemRenderer>
              <mx:Component>
                <mx:CheckBox selectedField="twoSelected"
                  change="onChange(event);" label="" enabled="{data.twoEnabled}">
                  <mx:Script>
                    <![CDATA[
                      private function onChange(evt:Event):void {
                        data.twoSelected = !data.twoSelected;
                    ]]>
                  </mx:Script>
                </mx:CheckBox>
              </mx:Component>
            </mx:itemRenderer>
          </mx:DataGridColumn>
        </mx:columns>
      </mx:DataGrid>
    </mx:Application>
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • Caml query using managed metadata column

    hi,
     I am having a console appln, where i want  to pass the one paramater in the form of siteCol1:subsite1:subsite2  where  siteCol1:subsite1:subsite2 is the path of subsite which is in MMS.
    Can i pass this string paramter to the splist which contains a taxonomy column   and match this paramter in the listitemcollection and fetch only those recordw which matches this crirteria.
    and it should fetch the values which matches in a splist. the caml query it expects contains the taxonomy -managed metadata column - , but i am stuck with
    SPList splistLIST = parenttWeb.Lists.TryGetList("LIST1");
                          if ((splistLIST.Items.Count > 0 && splistLIST!= null))
                              SPQuery   objnodeQuery = new SPQuery();
                              objnodeQuery.Query =
                                  string.Format(
           "<OrderBy>" +
              "<FieldRef Name='ID' />" +
           "</OrderBy>" +
           "<Where>" +
              "<Eq>" +
                 "<FieldRef Name='myTaxonomy' />" +
                 "<Value Type='Text'>{0}</Value>" +
              "</Eq>" +
           "</Where>", _mcurrentPathTermSet);
                              SPListItemCollection nodeItemCollection = splistLIST1.GetItems(objnodeQuery);
    am not able to retrieve the listitems which passes this as a parameter and retrieve those records where it matches this taxonomy column.
    my doubt is, how to pass a string parameter to the splist contains taxonomy column and fetch those records

    Hi,
    Managed metada column does not supported in lookup column as the thread below:
    https://social.technet.microsoft.com/Forums/en-US/0dee5ba4-9648-445f-a774-8c59cf01b81c/confirmation-needed-cant-lookup-managed-metadata-field-with-lookup-column?forum=sharepointgeneralprevious
    If you prefer managed metadata in Search, then I'd suggest you find workaround to use managed metadata column in lookup column. You could use a workflow to copy the managed metadata column to a text field, make the text field to be hidded from the list if
    necessary. Then lookup this text field in other list.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Update Managed Metadata field in SharePoint 2013 Designer Workflow for O365

    Hi Guys,
    I need to update the managed metadata field in SharePoint Custom List using Workflow but its not working. I have also tried to use the HTTP WebService POST Operation but no luck.
    Am doing this for a SharePoint Online (O365) Site.
    Has anyone worked on something similar and was able to get it running ?
    I saw a post to create a custom Workflow Activity but I don't have a choice to go with the custom code option.
    http://patrickboom.wordpress.com/2013/07/23/workflow-activity-set-managed-metadata-column/
    I was able to achieve this by creating a SP 2010 based Workflow for O365. Which means that it worked well with SP 2010.
    Is there a different way to do it in 2013 ? I tried almost all options apart from creating custom Activity but nothing worked out. 
    Any help would be great.
    Thanks,
    Nutan
    Nutan Sharma

    Hi Nutan,
    According to your description, my understanding is that you want to update Managed Metadata field with SharePoint 2013 Designer for SharePoint Online.
    As far as I know, there is not an OOB action to achieve your requirement with SharePoint 2013 Designer for SharePoint 2013. Customizing a workflow action is a better option to achieve it.  Why didn’t you customize a workflow action as Patrick’s blog?
    In addition, please take a look at the article about Nintex workflow, check whether it is useful for you:
    http://habaneroconsulting.com/insights/setting-managed-metadata-fields-in-a-nintex-workflow#.UykBSf6KDHo
    As this issue is about SharePoint Online, I suggest you create a new thread on SharePoint Online forum:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=onlineservicessharepoint . More experts will assist you.
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Create column from exsisting

    Hi Gurus,
    how to create column from exsisting column i.e
    table1-col1 and col2 wants to create from col1(copy
    thanks

    Assume that u have a table named dummy and the column name is c1.
    Execute the below commands in the same order:
    1) create table dummy1 as select c1,c1 as c2 from dummy;
    2) drop table dummy;
    3) Rename dummy1 to dummy;

  • Update list item with managed metadata field returns The security validation for this page is invalid

    Using SharePoint 2010 Server
    I'm attempting to programtically update a managed metadata field in a document library. I'm able to do it without issue on all other non-managed metadata fields. When I attempt it on a MM field I get the error message
    "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again."
    After some digging I realised that this error was being caused because SharePoint was trying to write to the TaxonomyHiddenList list (../sites/mysite/Lists/TaxonomyHiddenList/AllItems.aspx)
    When I update a document through the browser with a term (Term01), it shows up in this TaxonomyHiddenList . I can then run my application, apply Term01 to my new document and it works fine. But if I apply Term02 to my new document it gives me the error above.
    Summary
    My app can read the TaxonomyHiddenList fine but it can not perform an operation that would write to it, resulting in not being able to update the MM field.
    Question
    Is there any advice on how I can further debug this issue?

    Hi,
    According to your post, my understanding is that you want to update managed metadata field in document library programmatically.
    I have made a simple code demo below to updata managed metadata field in document library, it works like a charm, you can refer to it.
    public static void UpdateMSField()
    using (SPSite site = new SPSite("http://YourSiteURL"))
    using (SPWeb web = site.OpenWeb())
    //SPList list = web.Lists.TryGetList("Libs_1");
    SPDocumentLibrary lib = (SPDocumentLibrary)web.Lists["Libs_1"];
    // No point in proceeding if we can't find the list
    if (lib != null)
    // add a new item
    // SPListItem item = list.AddItem();
    SPListItem item = lib.GetItemById(1);
    //Console.WriteLine(item.Name);
    // get the current taxonomy session, which wraps up all of the
    // associated TermStore objects for this SPSite object
    TaxonomySession metadataService = new TaxonomySession(site);
    // get the taxonomy field
    TaxonomyField taxField = item.Fields["MMS_1"] as TaxonomyField;
    // get the term store associated with the taxonomy field
    TermStore termStore = metadataService.TermStores[taxField.SspId];
    // get the actual term set associated with the taxonomy field
    TermSet termSet = termStore.GetTermSet(taxField.TermSetId);
    // search for the terms we wish to set the field to
    var terms = termSet.GetTerms("term_1", true, StringMatchOption.ExactMatch, 1, false);
    // if we have found a term populate the field
    if (terms.Count > 0)
    // set the field to the term(s) we have found
    taxField.SetFieldValue(item, terms.First());
    // Update the item
    item.Update();
    Console.WriteLine("success...");
    More reference:
    http://www.3guysonsharepoint.com/?p=1052
    http://vineet-winit.blogspot.com/2013/04/how-to-update-managed-metadata-field-in.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to get the values of managed metadata columnn through object model

    Hi,
    I need to read the values from a managed metadata column, which is set to display entire path.
    Eg. My value looks like
    Critical:Important:Interesting:Routine:Not Evaluated
    without hardcoding these values, can i find which level of child has been chosen.
    if its not evaluated, i should find like last child like that..
    any way of doing that?
    Aruna

    Hi,
    thanks for the above reply.
    i got a new requirement as,  following is my managed metadata structure user selects the values from the below structure. i need to find the matching items with another list of same structure. the condition for matching is, if the user selects All,
    in the otehr list if the value in the region column equals any of the values in the structure below All like ema, denmark,nordborg is considered to be matched. if the user selects Denmark then the list contains denmark, nordborg and office is matched. means
    parent and its child contents are matched if the parent is chose. if the child is chosen only the exact value from other list(office==office in otehr list) is considered to be matched. how can i achieve it through object model coding?
    Aruna

  • SharePoint 2010 Slide Library Unable To Select Managed Metadata When Publishing.

    Hello,
    I'm running into some problems with Managed Metadata when uploading (publishing) slides in a SharePoint 2010 Slide Library.  If I have Managed Metadata Site Columns that are set to be required in my slide library, and I publish my slide(s) into the
    SharePoint 2010 Slide Library I'm not prompted to enter in my required Metadata before the slide is published.  The slide will upload, but then I would need to edit the slide and then enter in the required Metadata.
    If I create a new column with a type set to Choice for example, and set it to be required and I upload (publish) a slide I'm now prompted to enter in the required Metadata, but all the Managed Metadata choices are grayed out and I'm unable to select anything. 
    I'm able to select a Choice for the new column.
    Is this a bug within SharePoint 2010 that does not allow me to enter in Required Managed Metadata Tags on uploading (publishing) slides?
    Regular document libraries work just fine with required Managed Metadata.
    Thanks for any assistance.
    v/r
    JShidell
    v/r JShidell

    Hi,
    According to your post, my understanding is that the Managed Metadata not prompted to enter value in the required metadata.
    I had tested with this issue, and I found the same issue.
    We will help to submit the issue to proper pipeline for you.
    Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay. 
    Appreciate your time and patience.
    Thank you for your understanding and support.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Managed Metadata error - There was an error processing the request

    Hello there,
    I can edit terms in managed metadata service from Central Admin > Service Applications > Managed Metadata > Manage.
    BUT
    When I go to my Site Collection > Site Settings > Term Store Management - I get this error "There was an error processing the request".
    How to fix this please?
    Thanks so much.

    Hi,
    I understand that when you click Term store management there appears an error. You need to provide more error message so that we can better understand your issue. The error log is located here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS.
    Here is a similar case caused by security validation has timed out. You can turn off the  Web Page Security Validation in Central Administration:
    Click Application Management -> Manage Web Application, select the “Portal Home”, then click the General Setting in the top Ribbon bar.There is one option “Web Page Security Validation”, change it to “Never”.
    For more information, please refer to this site:
    Error “There was an error processing the request” in the Term Store manager Tool:
    http://jetxiaoli.wordpress.com/2011/07/28/error-there-was-an-error-processing-the-request-in-the-term-store-manager-tool/
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

Maybe you are looking for

  • Digital Audio and Software 6.0

    So I updated to 6.0 the other night and now my digital audio is not working. I have video going through HDMI to TV and Toslink going to Receiver. The audio goes through HDMI to TV no problem. The Toslink is not transmitting audio. I made sure that Do

  • Photos in events have disappeared - the folder just shows a palm tree

    In my events page, some of the events now just show a palm tree with nothing in it, my photos have diasappeared, any ideas

  • Final Cut Pro X Importing crashes

    HI, I am a long time user of Final Cut Pro but Brand new to X. I am trying to make my first log and capture and it just hangs. There is no "Import from camera " option from the file menu. I access it through the "Media" option. As soon as I turn my c

  • Error- clicking Visualize relationships using Customer Online User resp.

    Hi All, We are implementing CRM in our existing E business suite environment. We have applied the latest patches for the products JTF,ASL,ASP,ASN,OZF. Issue : Whenever the user clicks the " Visualize Relationships" Button that exists in the Customer

  • Prompting Failed (XIR2)

    Post Author: Jadero CA Forum: General The preview in the designer fails with:Prompting failed with the following error message: 'Unexpected error.'.Error source: prompt.dll  Error code: 0x80043800The runtime version of the reports just fail silently