Updating library column with Term Set Term description

Hi Community,
We are busy with a Document Management project using drop off libraries to file documents (docs) based on classification by a single level Term Set (example: "1000" (name) & "Client XYZ" (description)). Then auto
create folders each time there is a new classifcation,i.e. term, used (example "1000 - Client XYZ").
 The challenge we have is that auto folder creation is not allowed on term sets, thus we want to strip out the term name (1000) and the corresponding description (Client XYZ) to 2 seperate text fields and then concatenate them to become
an unique text field ("1000 - Client XYZ".) that can be used for the autocreation of folders in the library.
Does any one now how this can be acheived or maybe even suggest a better approach?
Kind Regards
Philip

I dont think with OOTB setting it can be done, however the logic which are explaining of concatenation could be done in custom code, what you need to do is as soon as a  document comes to drop off library on the item added event you can perform this
operation to create a folder
Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
INSQLSERVER.COM
Mohammad Nizamuddin

Similar Messages

  • UPDATE multiple columns with conditional SET parameters

    I have a procedure that updates multiple columns of a table using the procedure's parameter. Is it possible to have one update statement with conditional SET parameter?
    CREATE TABLE TEMP
    (POL_NUM NUMBER,
    OED DATE,
    TERM NUMBER,
    TRANS_CD CHAR(2));
    INSERT INTO TEMP VALUES (1, '1 AUG 2009', 12, 'NB');
    INSERT INTO TEMP VALUES (2, '4 AUG 2009', 12, 'XL');
    INSERT INTO TEMP VALUES (3, '2 AUG 2009', 12, 'RN');
    COMMIT;
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM NUMBER,
      pOED IN DATE,
      pTERM IN NUMBER,
      pTRANS_CD CHAR2)
    AS
    BEGIN
      IF pOED IS NOT NULL THEN
        UPDATE TEMP SET OED = pOED WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTERM IS NOT NULL THEN
        UPDATE TEMP SET TERM = pTERM WHERE POL_NUM = pPOL_NUM;
      END IF;
      IF pTRAN_CD IS NOT NULL THEN
        UPDATE TEMP SET TRANS_CD = pTRANS_CD WHERE POL_NUM = pPOL_NUM;
      END IF;
      COMMIT;
    EXCEPTION
      WHEN OTHERS THEN
         NULL;
    END;Is it possible to replace multiple IFs from the code to have only one UPDATE statement with condition that update the column only if the passed parameter is not null? In real scenario I have more than 3 columns and I don't want to write many IF blocks.
    Please help Gurus!!
    Edited by: Kuul13 on Sep 18, 2009 1:26 PM

    Hi,
    You certainly don't want to issue separate UPDATE statements for every column; that will be really inefficent.
    SQL has several ways to implement IF-THEN-ELSE logic. CASE is the most versatile, but NVL will do everything you need for this job. You can use one of those to set a column to itself (and therefore not really update that column) when appropriate.
    For example:
    CREATE OR REPLACE PROCEDURE TMP_PROC (
      pPOL_NUM   IN       NUMBER,
      pOED          IN   DATE,
      pTERM          IN   NUMBER,
      pTRANS_CD  IN       CHAR
    AS
    BEGIN
         UPDATE  temp
         SET     oed      = NVL (poed,       oed)
         ,     term      = NVL (pterm,       term)
         ,     trans_cd = NVL (ptrans_cd, trans_cd)
         WHERE     pol_num      = ppol_num;
      COMMIT;     -- Maybe
    END    tmp_proc;"EXCEPTION WHEN OTHERS THEN NULL" is almost always a bad idea. If there's an error, don't you want to know about it? Shouldn't you at least log a message in a warnings table or something?
    Think careflully about whether or not you want to COMMIT every time you call this procedure.
    Just as it's inefficient to issue a separate UPDATE statement for every column, it's also inefficient to issue a separate UPDATE statement for every row. If efficiency is important, it should be possible to UPDATE several rows in a single UPDATE statement, using NVL (or CASE, or COALESCE, or NULLIF, or NVL2, or ...).
    This was a very well-written question! Thanks for providing the CREATE TABLE and INSERT statements, and such a clear explanation.

  • How to update a column with default in a tabular form.

    We have a tabular form that has a submit button that does a multi row update. We would like to update a column with a defaut like APP_USER = updated user when the row is updated. Is this possible and how?

    used lovs and conditions.

  • Update Shared Column on Document Set creation

    hi,
    I have a cloud business app connected to sharepoint online,
    on certain actions i create a document set in a sharepoint library , the document set i use has a shared column set - i would like to set this value at creation time or just after creation so that any documents added inherit the value.
    from the cloud business app i am using the CSOM to create the document set (based on steven curran's post
    http://sharepointfieldnotes.blogspot.com/2010/06/making-your-sharepoint-2010.html)
    Any ideas?
    Thx

    Hi mrP,
    According to your description, my understanding is that you want to update the shared column on document set creation.
    I suggest you create a workflow to do it.
    You can create the workflow as the below:
    For the workflow Start Options, select “Start workflow automatically when an item is created”.
    After the above, publish the workflow.
    Best Regards,
    Wendy
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Update multiple columns with single update statement..

    HI all,
    i am reading the columns value from different table but i want to update it with signle update statement..
    such as how to update multiple columns (50 columns) of table with single update statement .. is there any sql statement available i know it how to do with pl/sql..

    As I understood, may be this. Here i am updating ename,sal, comm columns all at once.
    SQL> select * from emp where empno=7369;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17/12/1980 12:00:00        800                    20
    SQL> UPDATE emp
      2     SET ename = lower (ename),
      3         sal = sal + 1000,
      4         comm = 100
      5   WHERE empno = 7369;
    1 row updated.
    SQL> select * from emp where empno=7369;
         EMPNO ENAME      JOB              MGR HIREDATE                   SAL       COMM     DEPTNO
          7369 smith      CLERK           7902 17/12/1980 12:00:00       1800        100         20
    SQL> UPDATE emp
      2     SET ename = (SELECT 'ABCD' FROM DUAL),
      3         sal = (SELECT 1000 FROM DUAL),
      4         comm = (SELECT 100 FROM DUAL)
      5   WHERE empno = 7369;
    1 row updated.

  • Update a column with value of column of other table

    Hi,
    I am looking for an update statement for the following scenario
    With following 2 tables
    TABLE1 (Primary A, B)
    TABLE2 (Secondary C , D).
    C Column is not unique.
    Please provide me an update statement to update TABLE1.B with TABLE2.D where TABLE1. A = TABLE2.C
    Please note that TABLE2.C is not unique.
    Please let me know whether this satement is correct.
    UPDATE TABLE1
    SET B = (SELECT DISTINCT D FROM TABLE 2 WHERE A=C )
    Thanks
    Alla Kishore

    UPDATE TABLE1 T1
    SET T1.B = (SELECT DISTINCT D FROM TABLE2 T2 WHERE T2.C=T1.A )

  • "Updating Library"  - problem with uploading pictures

    I have been trying to upload pictures and when I go into photos it says "updating library" and it's been trying for at least an hour. I've tried uploading only 15 pictures and still nothing. I also have the issue with the size. Do I need to resize before upload? If so how and in what dimensions? Need help!!

    Theree is no need to resize photos, the computer will do that before transferring.
    Try force quitting the photo app on the iPad by holding the sleep wake button until you see the slide to power off screen. Then hold the home button until you are back at the home screen and try open the photos app again.

  • Update a column with info from columnA, and if not in columnA, then columnB

    I have a situation where I have to update a columnC with information stored one of 2 ways. It is stored one way in ColumnA, and another way in columnB. I must check the string if it is in columnA first, and if it is, that value will go in columnC to be updated. If it is not, I must go on to columnB and find it there. It will be in one of the 2 columns but I must use the way it is stored in these columns to store in my columnC to be updated. The data is basically turned around (not reversed letter for letter, though) in the 2 columns and must be stored the way it is found in columnA or columnB. Any ideas?

    It's that simple? It will look in both columns this way? Now, I actually mentioned UPDATE when I meant INSERT, so I am doing this in a VALUES clause? Will I just use the phrase 'nvl(A, B);'?

  • How to Loop through another list and update a column with SharePoint Designer 2013 Workflow

    Hi,
    I am trying to get my head around the new 2013 Workflow Engine and SharePoint Designer 2013 Workflow Text-Based Designer.
    I have two lists.
    List A has 2 columns: Title, Completed (Yes/No)
    List B has 3 columns: Title, LookupListATitle, Completed (Yes/No)
    All the 2013 Workflow components have been installed and configured and I am selecting the 2013 Workflow option in SPD
    I am trying to set off a 2013 Workflow when an item in List A is edited to Loop through List B and select items where the LookupListATitle column's value is equal to the Title value of the current item, and set the value of the Completed column for those
    items in ListB to "Yes".
    I have the Workflow configured like this:
    Stage: Stage 1
    IF Current Item:Completed equals Yes
    Loop: 1
    The contents of this loop will run repeatedly while: ListB:LookupListATitle equals Current Item: Title
    Update item in ListB. 
    (The dialog options for the update item action as follows:
    List: ListB
    Field: Completed, Value: Yes
    In the Find the List Item section
    Field: LookupListATitle
    Value: Current Item: Title)
    Transition to stage
    Go to End of Workflow
    When I update an item in ListA and set its Completed column to Yes, I would expect the Workflow to find all the items in List B where the Lookup column is equal to ListA's Title (there are 2) and update their Completed column to Yes. But it doesn't work.
    When I look at the Workflow Status it says the Internal Status is "Canceled" and the information pop up has the following alien language (and may be truncated):
    RequestorId: 95f03b62-8956-ac14-c5cf-dc98c89c589c. Details: System.ArgumentException: Invalid JSON primitive: Item001. Parameter name: value at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ConvertStringToJsonNumber(String value) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.ReadPrimitive(String
    type, XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(XmlDictionaryReader jsonReader) at Microsoft.Workflow.Common.Json.JXmlToJsonValueConverter.JXMLToJsonValue(Stream jsonStream, Byte[] jsonBytes)
    at Microsoft.Activities.DynamicValue.ParseJson(String json) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor
    executor, BookmarkManager bookmarkManager, Location resultLocation)
    Unfortunately I don't have access to the server, logs etc.
    I would love to find some tutorials, or any books on SharePoint Designer 2013 in general and Workflows in particular but my searches haven't turned up much so far apart from a pre-release Beginning SharePoint Workflows which is in its very early stages and
    not much help yet.
    Can anyone give me some guidance on how to set up While Loops to iterate through a related list using SharePoint Designer 2013?
    Mark

    Hi,
    I understand that you wanted to update the items in the other list (Participants) where the Course equals the Current Item.
    You need to use “Call HTTP Web Service" action and “Build Dictionary" action to get the Maxid and then loop Participants to update the items.
    You can follow the steps as below to achieve what you want:
    Create a custom list named Courses, add columns: Title(Single line of text), Course ID(Single line of text), Course Finalised (Yes/No).
    Create a custom list named Participants, add columns: Title(Single line of text), Course(Lookup), CourseFinalised (Yes/No).
    Create workflow associated to Courses, start the workflow automatically when an item is created or changed.
    Add conditions and actions:
    The HTTP URL is set to
    https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be order by Id and desc.
    Then if Course Finalised is equal to Yes, the CourseFinalised  of the associated items in Participants will be updated to Yes.
    More information:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Want to update a column with  different column of same table

    I have a table TEST_CDR which is having 250 millions records also having partition by hash.
    there are two column in this table ID and CDR_ID want to update ID in CDR_ID but it take too much time like 24 hours or more.
    please suggest me a simple way.

    Hi,
    You can try this. but be careful about your backups and go through CTAS,nologging and parallel concepts...
    Please refer this link.
    http://www.dba-oracle.com/t_fast_batch_updates_ctas.htm
    http://www.dba-oracle.com/t_nologging_append.htm
    http://www.dba-oracle.com/t_efficient_update_sql_dml_tips.htm
    http://eriglen.blogspot.in/2011/08/ctas-create-table-as-select-with.html
    1.CTAS with nologging and parallel..
    SQL> create table test_cdr_1(id,cdr_id) nologging parallel as select id,id from test_cdr;
    2.rebuild indexes, triggers and constraints to test_cdr_1
    3.rename test_cdr to bkup_test_cdr;
    4.rename test_cdr_1 to test_cdr;
    Regards,
    ragunath.

  • Update table column with same auto-increment value, via T-SQL stored procedure

    Good Evening to every one,
    I have a table 'Contracts' as we can see in the picture below (I exported my data on An Excel Spreadsheet). Table's primary key is 'ID' column.
    I am trying to create a stored procedure (i.e. updContractNum), through which I am going to update the 'Contract_Num' column, in every row where the values on Property_Code, Customer, Cust_Category and Amnt ARE EQUAL, as we can see in the schema above.
    The value of Contract_Num is a combination of varchar and auto_increment (integer). For example, the next value on 'Contract number' column will be 'CN0005' for the combination of 11032-14503-02-1450,00
    I' m trying to use CURSORS for this update but I am new in using cursors and I am stuck in whole process. I atttach my code below:
    CREATE PROCEDURE updContractNum
    AS
    --declare the variables
    DECLARE @CONTRACT_NUM VARCHAR(10); -- Contract Number. The value that will be updated on the table.
    DECLARE @CONTRACT INTEGER; -- Contract number, the auto increment section on contract number
    DECLARE @CONTR_ROW VARCHAR(200); -- Contract row. The row elements that will be using on cursor
    DECLARE CONTRACT_CURSOR CURSOR FOR -- Get the necessary fields from table
    SELECT PROPERTY_CODE, CUSTOMER, CUST_CATEGORY, AMNT
    FROM CONTRACTS;
    OPEN CONTRACT_CURSOR -- open a cursor
    FETCH NEXT FROM CONTRACT_CURSOR INTO @CONTR_ROW
    WHILE @@FETCH_STATUS = 0 -- execute the update, for every row of the tabl
    BEGIN
    --update Contract_Num, using the format coding : contract_number = 'CN' + 0001
    UPDATE CONTRACTS
    SET CONTRACT_NUM = 'CN'+@CONTRACT_NUM+1
    END
    CLOSE CONTRACT_CURSOR
    Thank you in advance!

    You dont need cursor
    You can simply use an update statement like this
    UPDATE t
    SET Contract_Num = 'CN' + RIGHT('00000' + CAST(Rnk AS varchar(5)),5)
    FROM
    SELECT Contract_Num,
    DENSE_RANK() OVER (ORDER BY Property_Code,Customer,Cust_category,Amnt) AS Rnk
    FROM table
    )t
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • LINQ: Update a column with auto increment value

    Hi All,
    Greetings.
    I am very new to C# (though with lot of experience in VC++). Now a days, I am engaged in a C# project where I need to deal with ADO.NET DataTable and related classes. I am stuck up in a scenario as follows:
    I have a data table (of DataTable type) pre-populated with many rows (50000+), parsed from a log file. Now I need to add a column that will be holding index number for each records; eg. 1, 2, 3......
    I have tried to add the auto-incremented column dynamically, with seed = 0 and increment = 1, but it is not working.
    Is there any LINQ query that I can run to update the DataTable at once? Or foreach loop per DataRow is the only option here?
    I appreciate any quick suggestion on this.
    Thanks in advance.
    Sanjoy Jana.

    You should add the auto increment column to the DataTable before you pouplate it with the other data:
    //1. Create a datatable
    DataTable dt = new DataTable();
    //2. add the autoincrement column:
    DataColumn column = new DataColumn();
    column.DataType = System.Type.GetType("System.Int32");
    column.AutoIncrement = true;
    column.AutoIncrementStep = 1;
    column.AutoIncrementSeed = 1;
    //3. Fill the dataTable using an SqlDataAdapter or whatever
    dt.Columns.Add(new DataColumn("name"));
    dt.Rows.Add("1");
    dt.Rows.Add("2");
    dt.Rows.Add("3");
    dt.Rows.Add("4");
    Then you don't have to add the "auto incremented" values yourself in some kind of a loop (using for example LINQ or foreach).
    If you want to know how to poplulate the DataTable from a database query using an adapter, please refer to the following page:
    http://www.dotnetperls.com/sqldataadapter
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • Update Multiple Column with Single Command with Join between Two tables.

    This is our command where we are trying to update a table's two columns by pulling values from another table after joining. This query takes too much time to execute. Any suggestions ?
    UPDATE raw_alc_rmfscombinednew
    SET (BSC, CELL_NAME) =
    SELECT distinct raw_alc_R110combinednew.BSC, raw_alc_R110combinednew.CELL_NAME
    FROM raw_alc_R110Combinednew
    WHERE
    raw_alc_R110Combinednew.OMC_ID = raw_alc_rmfscombinednew.OMC_ID
    AND raw_alc_R110Combinednew.CELL_CI = raw_alc_rmfscombinednew.CI
    AND RAW_ALC_R110COMBINEDNEW.START_TIME = RAW_ALC_RMFSCOMBINEDNEW.START_TIME
    Results of Last execution:
    Elapsed Time (sec) 4,476.56
    CPU Time (sec) 4,471.88
    Wait Time (sec) 4.68
    Executions that Fetched all Rows (%) 100.00
    Average Persistent Mem (KB) 32.43
    Average Runtime Mem (KB) 31.59
    --------------------------------------------------------------

    Your update requires a full execution of the subquery for each row in the destination table (raw_alc_rmfscombinednew). Try rewriting as a MERGE. Tons faster.
    MERGE INTO raw_alc_rmfscombinednew  D
          USING ( SELECT distinct
                         BSC,
                         CELL_NAME
                         START_TIME
                    FROM raw_alc_R110Combinednew )  S
             ON (    S.OMC_ID     = D.OMC_ID
                 AND S.CELL_CI    = D.CI
                 AND S.START_TIME = D.START_TIME )
        WHEN MATCHED THEN
          UPDATE
             SET D.BSC        = S.BSC,
                 D.CELL_NAME  = S.CELL_NAME

  • Update A Column with value of Column in the next Row

    Hi All,
    I have a table which is like this
    ID NUMBER,
    SUB_ID NUMBER,
    STARTDATE DATE.
    The Value is say for example like this:
    ID     SUB_ID     StartDate
    1     1     1-JAN-09
    1     2     20-FEB-09
    1     3     1-MAR-09
    2     1     10-JAN-09
    2     4     10-APR-09
    2     3     1-MAR-09
    2     2     2-FEB-09
    I have to add a new column END DATE in the table and populate a value which is One Day less than the value of
    start Date for next row. I have to order by ID and SubID and so that colum looks like this.
    ID     SUB_ID     StartDate          END DATE
    1     1     1-JAN-09          19-FEB-09
    1     2     20-FEB-09          28-FEB-09
    1     3     1-MAR-09          DEFAULT-END DATE
    2     1     10-JAN-09          1-FEB-09
    2     2     2-FEB-09          8-Mar-09
    2     3     9-MAR-09          9-APR-09     
    2     4     10-APR-09          DEFAULT END DATE
    Can this be achieved using a single update query or I have ot write a Procedure ...any help will be appreicaited

    or
    merge into test
    using (select rowid rid
                , id
                , sub_id
                , startdate
                , lead (startdate) over (order by id, sub_id) - 1 ed
           from test) x
    on (x.rid = test.rowid)
    when matched then
       update set end_date = x.ed
    ;

  • Dynamic update of column with values derived by formula on other table.

    i have 3 tables; table A,B and C
    table A has two columns (id and Quantity), based on the id value, the quantity value is computed using a formula on two rows (one from table B and the other from C).
    the formula is different for each id value.
    but after every month the quantity value has to be updated (because tables B & C get updated monthly).
    example. given id=1, quantity= select round((sum(h.col1)/sum(p.col1), 2) from B p, C h
    given id=2, quantity=select round((sum(col1)/sum(col3)), 2) from C
    so for every id the quantity is derived by a different formula, but the quantity value has to be recomputed every month.
    need help.

    1. update table a
    quantity = decode (id,1, <formul1>, id,2 , formula 2...)
    2. if you wanto schedule this as monthly task
    use dbms_job.submit
    send the above query to "What" parameter.

Maybe you are looking for

  • Error while configuring second instance of OIF

    Hi, i am installing OIF in dev environment in clusterred mode. I was able to create one instance successfully, but whille creating second i am getting error. The parameters of im_config_only.rsp are as below: [ENGINE] #DO NOT CHANGE THIS. Response Fi

  • Memory errors

    So I'm working in Flash CS3 on a scene with a ton of animated characters and it's sky rocketed to a 70mb file (some of the animation is rough hand drawn stuff at this point which could account for the size but they've all been trace bitmapped).  For

  • USB to RCA adapter

    Is there an RCA adapter that can work for a Mac Mini that will have female RCA inputs to either USB or FireWire? I'm trying to get my Camcorder movies onto my Mac Mini, only it has RCA out capability.

  • Opening link in browser

    Hi, The issue I'm having is pretty simple. I'm opening a URL from my AIR application using the following code: navigateToURL(new URLRequest(" http://" + url), "_blank"); I'm using Firefox 3, and when the opener is called, it opens a new tab in the br

  • JTable editCellAt

    Hello Javaers, I've a question for you regarding JTable edits - hoping to save some google time. I've a JTable that currently accepts edits by careful overriding of the standard methods, isCellEditable, and by specifying ((DefaultCellEditor)table.get