Update new field with existing data programmatically

I have a requirement to write a code that update an existing lookup field.
We are running sharepoint 2010. We have a content type, which is used throughout all the sites. The content type has a field called Product, which is a lookup field for all the products we have. The field also contains subproducts. For example, a product
by name PR1000 has a subproduct PR1010 all in the same drop down menu.
Now we want to change this grouping and separate them based on product and subproduct. I have created new field called Parent Product (PP) and Child Product(CP).
I would like to programmatically update the Parent Product field with Product and Child PRoduct field with child product if any. So here is how it works; if an existing item or document has product PR1010, I would to update PP with PR1000 and CP with 1010.
The problem I am having in order to start this project is the product field is part of every document library and lists and there are 1000s of items with data for product.
Please help with ideas or suggestions. I am thinking of a feature event receiver, which when activated will automatically update every item with product field not empty.
Thanks for your help in advance.

As Bruno suggested ,if its on time activity and on the all site then so go with Powershell 
script. use feature event receiver when it require on the selected site and if this require to extend
other sites so that contol will be at your end,else you need to again modified the powershell script.
Regards,
Rajendra Singh
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
http://sharepointundefind.wordpress.com/

Similar Messages

  • Populated the new field with historic data

    HI,
    I have a data for 2 years now I am enhancing the data source how can I populated the new field with historic data.Is it by
    1)deleting all the data in BW side and the doing an init then setting up a regular delta
    2)running a repair full request with selection condition.
    or is there any other option available? which is the best scenario to load these historic data?
    Regards,
    Ravi

    Hi,
    I think your datasource is already in production, and you want to data only from today onwards for enhanced fields, i.e. historical data is not required for enhanced fields..
    1.Fix ECC down time for 20 to 30 munities
    2. Keep all objects on Qty system in ECC and BW.
    3.Run Delta laods in BW for 2 to 3 times.So with this step you can clear SMQ1 and RSA7. Check the entries in RSA7, if it is ZERO then it is fine.
    4. Move DS from ECC Qty to ECC PROD .
    5. Replicate in BW.
    6. Move all BW objects from BW Qty to BW Prod.
    7. Delete Init load in InfoPackage level (Not in ODS/CUbe).
    8.Load Init without DataTransfer.
    9.Then Run Delta.
    10. Next day on wards deltas will come as usual.
    If you need Historical data also.
    1.Delete data in Cube.
    2.Fix Down Time and load Init then Delta.
    Check
    SAP Note 328181 - Changes to extraction structures inCustomizing Cockpit
    Thanks
    Reddy

  • Adding a new field to Existing data Datasource

    Hello,
    If  I want to add extra field to the existence Data Source in SAP R/3 how will you do? and how will you extract the data in SAP BW .could you please explain the steps. I would appreciate.
    Thanks in Advance.
    Sri

    1)Go to RSA6 and find the data source you need to enhance.--> Display
    2)Double click  on the Extract structure.
    3)Now click on the append structure button to add the required field on to the existing structure.
    4) add your required fields with ZZ appended to your field.
    5) Save & Activate the append structure. Then go back and make sure you activate the extract structure also.
    6) Now again go back to RSA6 and select your Data Source. But this time go to change Data Source to remove the hide option to the enhanced fields. By default they’ll be in hide mode. If you don’t remove the hide field then this field will not be seen in BW side.
    7) Now go to SE38 to write the logic to populate the data into the enhanced field. Program name to write the logic is ZXRSAU01.
    8) Check + Save + Activate.
    9) Check in RSA3 if data is populated as per your requirement.
    10) Replicate your Data Source.
    11) Now go to Data Source/ Trans. Structure screen. Now you can see the enhanced field on the right hand side.

  • Update text fields with xml data based on DDL selection of an ID number

    Hi guys,
    this one should be straight forward, but I cant seem to find a straight forward answer.  In a nutshell:
    XML file contains ID, Name, Location (so far 3 records in sample xml file)
    Form contains a Dynamic Drop down list to allow selection of ID and text fields to display the associated name and location of that ID.  The binding of the Drop down works fine, however I need the other fields to update to the associated name and location when different ID's are selected.  I assume I'll need some sort of exit event on the drop down list to update the other fields with the Name and location of the ID selected, but I dont know enough to have a stab at it.
    please, please, please help, Im starting to pull my hair out.
    James.

    Hi James,
    This would depend on the structure of your XML but assuming you have something like;
    <Data>
                <Item>
                            <Id>1</Id>
                            <Name>Name1</Name>
                            <Location>Location1</Location>
                </Item>
                <Item>
                            <Id>2</Id>
                            <Name>Name2</Name>
                            <Location>Location2</Location>
                </Item>
                <Item>
                            <Id>3</Id>
                            <Name>Name3</Name>
                            <Location>Location3</Location>
                </Item>
    </Data>
    Then in the change event of your dropdown (your could use the exit event but then value might not have changed so would be performing unnecessary processing) add the following code.
    var itemGroup = $data.Data.resolveNode("Item.(Id.value === '"+xfa.event.change+"')");
    Name.rawValue = itemGroup.Name.value;
    Location.rawValue = itemGroup.Location.value;
    The xfa.event.change will be the value selected, the resolveNode will return the Item with the matching Id, and then it is just a matter of assigning it to your form fields.
    Hope this gets you started.
    Regards
    Bruce

  • Adding new fields to existing cube

    Hi all,
    We have a cube with data, now we added 2 new fields to the datasource. And want to add two more fields in the Cube to correspond to the new fields. What would be the impact on the data that is already there in the cube? Can I go ahead and add the fields in the cube and start extracting data? What I want to know is what would be the implications in such a scenario?
    Any insight or help would be appreciated and fully rewarded.
    Thanks,
    Mav

    Hi,
    At least from the experience I had there were no performance issues. The only issue would be in terms of the time taken to transport. The larger the amount of data ,longer the transport time.
    You can continue extraction of data for those 2 fields from that point on. No need to empty the data from the cube and reload again. Only thing is that the data in the past for these 2 fields may not be mapped to the existing data in the cube. If you want to do that dump the cube and reload. Otherwise the data will be mapped from the time you start extracting the new fields with the data in the cube.
    Cheers,
    Kedar

  • Cannot update new field through SharePoint properties on re-pubished InfoPath form

    Hello,
    I would truly appreciate any help with this problem. I've searched the forum for answers to this issue, but none of the ones I've found seem to
    apply.
    We are using SharePoint 2007. 
    When I re-publish a form with a new field, I am unable to modify that new field through SharePoint properties on older forms. I have tried re-linking the old forms but that does not resolve the issue. I can re-create this problem consistently in new
    and old InfoPath form libraries.
    Here are the latest steps I have taken to re-create the error:
    Created Form Library called Error Testing.
    Created new form (from blank template) with three data fields in the data source: name, occupation and address.
    Added section and all fields onto the form.
    Published form to Error Testing library. All fields were promoted and selected the “Allow users to edit data in this field by using a datasheet or properties page” option.
    Created and saved Form 1 in library with no issues.
    Opened edit properties and was able to modify and save the content in all three fields.
    Added a new field to the form template: City.
    Published form to Error Testing library. The original fields, and the new field were promoted and selected the “Allow users to edit data in this field by using a datasheet or properties page”
    option.
    Created and saved Form 2 in library with no issues.
    Opened edit properties in Form 2 and was able to modify and save the content in all three fields.
    Opened edit properties in Form 1, modified all fields and got the following message when I tried to save: 
    "Changes could not be saved into the document. The property to change is read-only for the document's content type, or the document is missing XML elements or attributes where
    the changes would be saved. Try editing the document in a Windows SharePoint Services-compatible XML editor such as MicroSoft Office InfoPath."
    Modified each field one at a time and determined the field I could not edit and that was causing the error message was
    the new City field.
    I re-linked Form 1 and got same error message when I tried to modify the City field.
    I opened Form 1 entered the city and saved.
    The content of the city field appears in the SharePoint column and I am able to edit the content through the Edit Properties field.
    This is an issue when we run a workflow that tries to update the new field on an old version of an InfoPath form.

    You can certainly add the fields manually by using SharePoint Designer, but a more effective way to Open the form template in "Design Mode" Click "Tools" and then "Form Options" Choose "Versioning".
    InfoPath defaults to not Upgrade forms automatically. If different versions are not a historical issue for this solution, then Change the default to "Automatically Upgrade Old Forms". Then republish form... The Next time you open a from in
    the library with this content type it will upgrade the old forms in the library.
    Have a look at this post on the same topic:
    http://social.msdn.microsoft.com/Forums/en-US/cffd3fa0-0a53-4ef2-8c62-0764cbe9f0e2/adding-new-fields-to-existing-infopath-form-template?forum=sharepointcustomizationlegacy

  • Adding new field to Master Data

    Hi All,
    I have one master data which is business content.
    i need to add one custom field in that with the status information of records. that new field will get data from R/3 status table via extractor from CMOD.
    now this Master data is having delta.
    my confusion is if i add new field in it how the delta will react ? coz there are different status - eg. when user create the status - it will be "created" that time delta will pick up that record coz it has been changed. Now if user changes status to "closed" or "in transit" how delta will react ?
    i meant is it doable to do like that ?  any guidance will be appreciated.
    Thanks in advance.

    Smith,
    Your master data extractor will continue to give your existing fields- as for delta - it depends on how the delta is managed - you would have to find that oiut - is it on timestamp / date et etc... ?
    CMOD will change only the extract structure and whenever this datasource is called - CMOD fills in the additional field - nothin about delta / init here...
    Arun

  • Best way to give a default value to a New Column with existing rows

    Adding some columns to SQL tables with existing data rows. There are also views created from these tables. The views are used in some report/query software so NULL values are not good. Interested in learning about the best way to set a default value. 
    These are the ways that I can think of
    1) ALTER TABLE using the DEFAULT to add the column and set the default value
    ++ Adds a constraint which is not terrible. Constraints are just not used much in this shop.
    2) ALTER TABLE to add the column then do an UPDATE statement to update the values
    ++ might be an issue for tables with millions of rows
    3) ALTER TABLE to add the column then use ISNULL in the CREATE VIEW

    It is a large table with 444 columns and max row size of 2268. 907k records took 1 minute 38 seconds to UPDATE the column. I have about 12 fields to add to this table and about 44 tables (not all this large of course) so it will take some time to
    UPDATE.  Although ... i just tried updating 3 columns in a single UPDATE and it took 1 minute 36 seconds. So If I did all 12 fields in a single UPDATE it would be about the same time as a single Field.  I will think about it.

  • Add a new field to existing Table

    Hi , We want to add a new field to existing table from ECC  and populate historical data .
    We have already extracted data from ECC to VBAK Table . We have to add a new field - Incoterms in HANA . This field exists in ECC .
    Please guide.

    Hi Vicky,
        I dont think you can add new fields to the condition table once you have activated the condition table.
    SAP says you can only make limited changes to the condition table, like changing the description, fast entry screen, header and footer fields, but not able to add new fields to the table, and I think that is the correct approch or else for the same table you will have two sets of condition records.
    Please refer to the below link:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/de/7a8534c960a134e10000009b38f83b/frameset.htm
    What you can do is create a new condition table with additional field and assign this table before the currently used table in the access sequence.
    Hope this helps.
    Regards
    Raj

  • Add new fields in Additional data tab B in Inquiry,

    HI,
    I want  to add additional new fields in inquiry on the addition tab -B, like
    Architect Name
    Contractor name
    followed By
    referenced by  like this, and want to capture the report on these fields
    plz guide
    thanks in advace

    Dear Rishi,
    Please Don't post multiple threads for same issue(i.e Add new fields in Additional data tab B in Inquiry).
    Try with these User Exits,
    USEREXIT_MOVE_FIELD_TO_VBAK
    Use this user exit to assign values to new fields at sales document header level. It is described in the section "Transfer of the customer master fields into the sales document".
    The user exit is called up at the end of the FORM routine VBAK_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBAP
    Use this user exit to assign values to new fields at sales document item level. It is described in the section "Copy customer master fields into the sales document".
    The user exit is called up at the end of the FORM routine VBAP_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBEP
    Use this user exit to assign values to new fields at the level of the sales document schedule lines.
    The user exit is called up at the end of the FORM routine VBEP_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBKD
    Use this user exit to assign values to new fields for business data of the sales document. It is described in the section "Copy customer master fields into sales document".
    The user exit is called up at the end of the FORM routine VBKD_FUELLEN.
    I hope this will help you,
    Regards,
    Murali.

  • Problem with updating oracle DB with java date thru resultset.updateDate()

    URGENT Please
    I am facing problem in updating oracle database with java date through resultset.updateDate() method. Can anybody help me please
    following code is saving wrong date value (dec 4, 2006 instead of java date jul 4, 2007) in database:
    ResultSet rs = stmt.executeQuery("SELECT myDate FROM myTable");
    rs.first();
    SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-mm-dd");
    java.util.Date myDate = new Date();
    rs.updateDate("myDate", java.sql.Date.valueOf(sqlFormat.format(myDate)));
    rs.updateRow();

    I believe you should use yyyy-MM-dd instead of yyyy-mm-dd. I think MM stands for month while mm stands for minute as per
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    (If this works, after spending so much of your time trying to solve it, don't hit yourself in the head too hard. I find running out of the room laughing hysterically feels better).
    Here is a more standard(?) way of updating:
    String sqlStatement=
    "update myTable set myDate=? where personID=?"
    PreparedStatement p1= connection.prepareStatement(sqlStatement);
    p1.setDate(1,new java.sqlDate());
    p1.setInt(2, personID);
    p1.executeUpdate();

  • SharePoint 2013 unable to create new column with existing column name

    Hi Support,
    I'm currently having a problem in creating my first custom list in my SharePoint site. When I tried to create a new columns with existing name,  e. g "date reported" = Date/Time , "Due Date" =
    Date/Time 
    It's prompt the error like this " The page at sharepoint.itechdomain.com says: The Column name that you entered is already in use or reserved. Choose another name." I've read some forum, someone say's they need javascript command
    to fixs the problem. If these the solution for my problem, I'm not familiar on how to used javascript in my sharepoint. 
    Kindly help me how to fixs my problem as soon as possible.
    Your comment or any suggestion would be greatly appreciated.
    Thank you 
    Best Regards,
    Bishelp

    I already tried this procedure, but it doesn't work. Still the prompt says " The
    Column name that you entered is already in use or reserved. Choose another name". Is there any solution for this kind of problem?
    Let me know, 
    Thank you

  • Autofilling cells with existing data above in column? Numbers 2.0 did it, seems lost in 3.0

    Autofilling cells with existing data above in column? Numbers 2.0 did it, seems lost in 3.0
    Hello,
    Just upgraded to Numbers 3.0 and use it for keeping the books on my business. When I input my receipts at the end of the day in to Numbers, it used to autofill the cell with suggestions as I type using existing data that is present in the same column within the table.
    For example, I purchase parts from "Parts Store". Before instead of typing the entire phrase, I could just input the letter P and "Parts Store" would instantly pop up as a suggestion. I could hit enter and I would move on to the next cell. Made inputing data a lot easier.
    It worked in 2.0, but seems lost in 3.0. Is there a way to turn this on? I tried searching with no luck.
    Thanks for your help!
    AJ

    Hi AJ,
    Cells formatted as pop-up are designed for this purpose, to choose from a list of repeating values. Even less typing.  I like them better myself.  No typos.
    In the new Numbers hitting the spacebar doesn't activate a list so you have to go to the trackpad or mouse to make a pick from the list. It's very fast for me, but that depends on your setup and habits.
    SG

  • There is 1 drive with existing data on your LenovoEMC px6-300d.

    Hi,
    on the display of my px6-300d there is an error: "There is 1 drive with existing data on your LenovoEMC px6-300d".
    Firmware version is 4.0.8.23976.
    When I logon to web page of the device and click on the error message, I can see Storage Pool SP1 with capacity of 10.84TB of which 10.84TB is available. Drive 1 is "shaded", drives 2-6 are "A"
    However there are no volumes there...
    In the event log I can see following events (logon events removed):
    09/08/2014 7:40 pm  The device is starting up...
    09/08/2014 7:37 pm userid Restart requested.
    09/08/2014 7:33 pm  Storage verification completed.
    09/08/2014 8:43 am userid Storage Pool 'SP1' has been modified.
    09/08/2014 8:43 am userid Storage Pool 'SP1' has been added.
    09/08/2014 8:43 am userid Verifying the state of storage.
    09/08/2014 8:38 am  Data may be unavailable due to a failure.
    09/08/2014 8:38 am  Storage verification completed.
    09/08/2014 8:32 am  Verifying the state of storage.
    09/08/2014 8:32 am  The device is starting up...
    09/08/2014 8:29 am userid Restart requested.
    09/08/2014 6:49 am  Data may be unavailable due to a failure.
    09/08/2014 6:49 am  Storage verification completed.
    09/08/2014 6:46 am  Drive number 1 encountered a recoverable error.
    09/08/2014 6:42 am  Verifying the state of storage.
    09/08/2014 6:42 am  Your LenovoEMC px6-300d was shut down improperly, which can cause your most recent changes to be lost.
    09/08/2014 6:42 am  The device is starting up...
    09/07/2014 10:11 am  Data may be unavailable due to a failure.
    08/22/2014 7:54 am  Data is available, but a failure has been detected.
    08/13/2014 1:53 am  Storage verification completed.
    08/11/2014 9:15 pm  Verifying storage data protection.
    I have spoken to an admin who reported this issue today in the morning. He has told me that he had spotted the problem on 7:03 am when one of virtual machines with a drive on px6 failed. He was waiting and on 8:29 am he restarted the device and after restart he started storage verification. When it finished (7:33 pm) he again restarted the device. There are no new error events in the event log, however I cannot see any data on the device.
    When I click on drive 1 in Drive Management, I get a message "This drive contains existing data that must be overwritten before it can be used. Are you sure you want to overwrite the existing data?"
    Does it mean that before RAID rebuild px6 requires approval to delete the drive with recoverable error (as seen on6:46 am in event log) and rebuild RAID? Should I click YES? I hope I will not loose the data.
    Best regards,
    Marcel

    Hello vinaykumaar
    I recommend that you power down the unit and swap the affected hard disk to another drive bay to see if that prevents the unit from restarting.
    Then try allowing the unit to overwrite the specific drive.  On a px unit this would be done via the storage pool information overview under drive management.  On a ix unit you would go to Drive Management>Settings, check the "add disks to storage system..."  then click apply.  This will overwrite the disk marked by the green stripes.
    If the above options do not help I recommend that you contact Lenovo Support in your region for further assistance.
    LenovoEMC Contact Information is region specific. Please select the correct link then access the Contact Us at the top right:
    US and Canada: https://lenovo-na-en.custhelp.com/
    Latin America and Mexico: https://lenovo-la-es.custhelp.com/
    EU: https://lenovo-eu-en.custhelp.com/
    India/Asia Pacific: https://lenovo-ap-en.custhelp.com/
    http://support.lenovoemc.com/

  • How to add new fields to a data extract

    The following data extract program generates an output file which is displayed using a publisher template as a check format report.
    Oracle Payments Funds Disbursement Payment Instruction Extract 1.0
    How would I add new fields to the generated file? In other words what is the procedure to add new fields to the data extract?
    Thanks

    Do anyone pls advise how to customize the payment extraction program? We also have the similar requirement to extract extra fields to format a payment file.

Maybe you are looking for

  • Transfer few files from Macbook Pro to iPad 2

    I It says i need to click Apps ( i think it in Itunes) and then activate filesharing at the bottom after it is connected to computer's usb to from Ipad 2 I need more documentation.

  • Loading JEditorPane from an XML file parsed by

    an XSL translator. the JEditorPane setPage needs a URL, I'm wondering if there is anyway way to have the XSL tool write directly to the JEditorPane?

  • ASR 1001 SFP issue

    I am working on putting a loaner ASR 1001 into my infrastructure to replace my 7206 VXR.  Currently my uplink to my ISP is fiber and runs into an GBIC SX MM transceiver.  No issue with connectivity.  When i change the fiber patch over to LC I connect

  • Sqlplus how to use arrow key look the history

    sqlplus in DOS, I can use arrow to look the sql statement history. How to use arrow in Solaris. Thanks

  • ESPN Goal Line out in VHO-4 (Takoma Park, MD)

    Channel 571.  No picture, no signal, no sound.  This is *not* the pixelation issue that other areas were reporting last week.  This is a complete black screen with no signal.  Please fix.