Best method - update multiple items

Hello all. I have 2 tables. One called deposits and another called items. 1 deposit can have 1 or many items.
Hence the item table looks like this
|  item_num      |  item_name     |   deposit_id    |
|       1        |   bike         |          1      |
|       2        |   helmet       |          1      |
|       3        |   bike         |          2      |
-----------------------------------------------------Now, I would like to update deposit 1. I would like to remove helmet from the deposit. The way I figure to do it is to do the following:
1) Remove all items where deposit id = 1
2) Add new items found in text area and set their deposit id to 1.
Would this be the correct way to do it? Update ??

Nah, its a bit awkard, or perhaps my brain matter isn't dense enough to get it :D
I could delete multiple items from a text area.
ie before the text area may look like this:
bike
helmet
gloves
lights
Then after the update it may look like
bike
bike
gloves
I opted for the delete all then re-inputted the answers. Thanks for your response anyway Eric H.

Similar Messages

  • How to Update multiple items in other list using event handler?

    Hi All,
    If i update a item in a list, then i should update multiple items in another list need to be update. How to achive using event receivers?

    Hi Sam,
    According to your description, my understanding is that you want to update multiple items in another list when updated a list item.
    In the event receiver, you can update the multiple item using Client Object Model.
    Here is a code snippet for your reference:
    public override void ItemUpdated(SPItemEventProperties properties)
    string siteUrl = "http://sp2013sps/sites/test/";
    ClientContext clientContext = new ClientContext(siteUrl);
    List oList = clientContext.Web.Lists.GetByTitle("another list name");
    ListItem oListItem = oList.GetItemById(1);
    oListItem["Title"] = "Hello World Updated!";
    oListItem.Update();
    clientContext.ExecuteQuery();
    Best regards,<o:p></o:p>
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • How do you update multiple items in a JSP that are only checked...

    I have list of items in my jsp pages and that are being generated by the following code
    and I want to be able to update multiple records that have a checkbox checked:
    I have a method to update the status and employee name that uses hibernate that takes the taskID
    as a paratmeter to update associated status and comments, but my issue is how to do it with multiple records:
    private void updateTaskList(Long taskId, String status, String comments) {
    TaskList taskList = (TaskList) HibernateUtil.getSessionFactory()
                   .getCurrentSession().load(TaskList.class, personId);
    taskList.setStatus(status);
    taskList.setComment(comments);
    HibernateUtil.getSessionFactory().getCurrentSession().update(taskList);
    HibernateUtil.getSessionFactory().getCurrentSession().save(taskList);
    <table border="0" cellpadding="2" cellspacing="2" width="98%" class="border">     
         <tr align="left">
              <th></th>
              <th>Employee Name</th>
              <th>Status</th>
              <th>Comment</th>
         </tr>
         <%
              List result = (List) request.getAttribute("result");
         %>
         <%
         for (Iterator itr=searchresult.iterator(); itr.hasNext(); )
              com.dao.hibernate.TaskList taskList = (com.dao.hibernate.TaskList)itr.next();
         %>     
         <tr>
              <td> <input type="checkbox" name="taskID" value=""> </td>
              <td>
                   <%=taskList.empName()%> </td>           
              <td>          
                   <select value="Status">
                   <option value="<%=taskList.getStatus()%>"><%=taskList.getStatus()%></option>
                        <option value="New">New</option>
                        <option value="Fixed">Fixed</option>
                        <option value="Closed">Closed</option>
                   </select>          
    </td>
              <td>               
                   <input type="text" name="Comments" MAXLENGTH="20" size="20"
                   value="<%=taskList.getComments()%>"></td>
         </tr>
    <%}%>
    _________________________________________________________________

    org.hibernate.exception.GenericJDBCException: could not load an entity: [com.dao.hibernate.WorkList#2486]
    org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
    org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
    org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    org.hibernate.loader.Loader.loadEntity(Loader.java:1799)
    org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
    org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
    org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
    org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
    org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
    org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
    org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:161)
    org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
    org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:889)
    org.hibernate.impl.SessionImpl.load(SessionImpl.java:808)
    org.hibernate.impl.SessionImpl.load(SessionImpl.java:801)
    com.web.UpdateWorkListAction.execute(Unknown Source)
    org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    before I was running a single update as below and it worked fine:
    session.beginTransaction();
    int taskId = Integer.parseInt(request.getParameter("taskId"));
    String action_taken = request.getParameter("action_taken");
    WorkListErrors worklistErrors
    = (WorkListErrors) session.load(WorkListErrors.class, new Integer(taskId));
    worklistErrors.setAction_taken(action_taken);
    session.update(worklistErrors);
    session.save(worklistErrors);
    session.getTransaction().commit();
    but when I try an an update on multiple records it does work when I have a check box checked :
    session.beginTransaction();
    int taskId = Integer.parseInt(request.getParameter("taskId"));
    String action_taken = request.getParameter("action_taken");
    WorkListErrors worklistErrors
    = (WorkListErrors) session.load(WorkListErrors.class, new Integer(taskId));
    worklistErrors.setAction_taken(action_taken);
    session.update(worklistErrors);
    session.save(worklistErrors);
    session.getTransaction().commit();
    session.beginTransaction();
    String[] tickedTaskId = request.getParameterValues("tickedTaskId");
    String[] taskId = request.getParameterValues("taskId");
    String[] action_taken = request.getParameterValues("action_taken");
    for(int i=0; i<tickedTaskId.length; i++) {
    for(int j = 0; j < taskId.length; j++) {
    if(tickedTaskId.equals(taskId[j])) {
    WorkListErrors worklistErrors
    = (WorkListErrors) session.load(WorkListErrors.class, tickedTaskId[i]);
    worklistErrors.setAction_taken(action_taken[j]);
    session.update(worklistErrors);
    session.save(worklistErrors);
    session.getTransaction().commit();
    /*Close session */
    session.close();

  • What is the best method for multiple language interface?

    Hi,
    I need to adapt my CVI application to multiple languages.  But I have to be able to do this on the fly.  The Localizer is great for all the panel objects and this works great.  But I was wondering what the best method is for all the dialog box text?  Right now I'm using const char defines for the text. For exampl:
    const char *CONST_NO_STRING         = "No";
    Is there a simple method, or best practice method, to load different language dialog text at run time or on the fly?
    Thanks,
    Andy

    Not sure if Andy's original concern was settled... but let's try and button this up:
    - The UI Localizer does use a text file with manually-written translated strings for each supported language
    - From the Localizer help: this will only aid in translating the panel labels.
    Use this instrument driver to easily display user interfaces in different languages. When loading a panel or menu bar, you can specify a language file that contains translations for all the labels on the panel and all the menu items. You can create different language files for the user interfaces by translating them with the User Interface Localizer utility (localui.exe).
    - If you have additional content to be translated (like the text inside a drop down box), manually loading from .lwl, or similar, files and programmatically setting those dialog box entries would be the solution. - Looks like CVI should handle multibyte languages just fine (see below), though I have never used them.
    To close, these 2 devzones are good references:
    http://zone.ni.com/devzone/cda/tut/p/id/4036
    http://zone.ni.com/devzone/cda/tut/p/id/3841
    Regards,
    Peter Flores
    Applications Engineer

  • Can a method return multiple items

    Can a method return more than one thing?
    I want to have a method return a boolean and a String. My method is saying if something is right or wrong, then its saying the reason why.
    help, please.
    Thanx

    Afternoon_Delight wrote:
    My question is:
    Is there a way so that it can be more like this:
    public boolean, String checkValidity (){
    To expand on the previous posts, one way (not saying it's the best one!) is to create an object that combines the information that you want returned:
    public class MyValid
      private boolean valid;
      private String text;
      public MyValid(boolean valid, String text)
        this.valid = valid;
        this.text = text;
      public boolean isValid()
        return valid;
      public String getText()
        return text;
    class DoFoo
      public MyValid checkValidity()
        return new MyValid(false, "Because I said so!");
    }

  • Updating multiple item in a block

    Hello
    I have a block that displays data from a table. A button on another block but on the same canvas where the block is. I'm trying to update a field on all displayed records to a value.
    I wrote the following in the button:
    SET_BLOCK_PROPERTY('TOOLS', UPDATE_ALLOWED, PROPERTY_TRUE);
    :TOOLS.STATUS := 'Issued to Employee';
    this updates the STATUS field of the first record in the block because the first record is activated.
    Any possibility to update the STATUS field of all the displayed records at once?
    Thanks in advance

    There may be another, I believe better, way: first update the underlying database table using a simple update, then requery the datablock. Doing so you would no longer need to loop through all the records in the datablock, which means actually fetching all the records (think also of the network traffic between the application server/client and the DB server, which may cause problems). The update would run in the databse, then the query would fetch only a bulk of records (not all of them).

  • Spark list: how to unselect multiple items programmatically?

    Hi, I have a spark list with multiple selection allowed. I want to add a button next to the list with which to deselect all selected items. How do I go about that? I tried to set myList.selectedItems = null, and myList.selectedItems = new Vector.<Object>, but to no avail. Help would be very much appreciated!

    Hi Sam,
    According to your description, my understanding is that you want to update multiple items in another list when updated a list item.
    In the event receiver, you can update the multiple item using Client Object Model.
    Here is a code snippet for your reference:
    public override void ItemUpdated(SPItemEventProperties properties)
    string siteUrl = "http://sp2013sps/sites/test/";
    ClientContext clientContext = new ClientContext(siteUrl);
    List oList = clientContext.Web.Lists.GetByTitle("another list name");
    ListItem oListItem = oList.GetItemById(1);
    oListItem["Title"] = "Hello World Updated!";
    oListItem.Update();
    clientContext.ExecuteQuery();
    Best regards,<o:p></o:p>
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • Is it possible to run single workflow instance for multiple item changed or created?

    I have created a SharePoint Designer 2010 approval workflow and I am starting this workflow on item created and modified . Now when I am adding and updating multiple items it is starting workflow for each item but I want to start only one workflow for all items.
    I think it is possible in workflow 2013 but i want to use in
    workflow 2010.
    Is this possible? if yes then how?

    Hi Resham,
    From your description, my understanding is that you want to only start a workflow instance when multiple items are added or updated.
    Per my knowledge, if we set workflow start on item created or modified, when we add or update multiple items, SharePoint will create a workflow instance for each item, it is unable to just create an instance for multiple items. It is same
    between SharePoint 2010 workflow and SharePoint 2013 workflow.
    You said it is possible in workflow 2013, do you have any references?
    Thanks,
    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]

  • How do I update grouping or description for multiple items?

    As the question implies, I would like to update information in the Grouping and Description fields for multiple items as a way to keep things organized. What I have discovered is that there are some quirks in the new Get Info window that were not in past implementations, which are completely inexplicable and nonsensical to me.
    For instance, when you open the Get Info window for an item that has no information in, for instance, the Grouping field, you will not see a Grouping input field, as in this screenshot. The Grouping field should be where the bottom arrow is. Notice also that the Description field is available. I will get back to that in a minute.
    If you manually double-click into the Grouping field on the main iTunes screen, you can enter the information there. Then, when you open the Get Info window, ta-dah! The field magically reappears, as in the screenshot below.
    The trouble comes when you want to edit this field for multiple tracks. If you select multiple tracks, and they do not all have the Grouping field already populated, the field does not appear. What this means is that you are forced to manually enter the information for every track! This is completely unacceptable when you need to edit information for, as in my case, 122 tracks. The following image shows the Get Info window that appears after selecting two items, one with the Grouping field manually populated, and one with no info in the Grouping field.
    Not only has the Grouping field disappeared, but the Description field, as well. Thanks, Apple, but I think I can decide for myself whether or not to populate these fields for multiple items. Let's get 'em back, huh?
    SO… does anyone know of any valid method for accomplishing this task? Without manually entering the same information in hundreds of fields? This is the future; computers are supposed to do these monotonous tasks for us, aren't they?
    Oh, please don't suggest Option-clicking to open the older, better, Get Info window, as Apple has decided that we should not have that option any longer. We apparently have to organize our music their way. Think different!

    The Add Field button was in the editors of 12.0.1 (where the new-style editors had a very "half-finished" feel)  - it is not there in 12.1.  Apple have determined which metadata fields should be available for each kind of media, with no option for the user to modify this.  In Apple's own words: "Get Info has been completely redesigned in iTunes 12 to focus your attention only on what’s necessary for the selected item."
    The only options are:
    temporarily change the media kind (Options tab) to one that includes the field you want to add values to, enter those values, and then change the media kind back again
    make the relevant fields visible in an appropriate list view and edit values there - the big limitation being that you can only do this one item at a time
    I can see - to a degree - why Apple may have made some limitations so that metadata elements are available based on their relevance to different media kinds.  However, one of the issues mentioned above seems like a bug - if a single audiobook file can have a Description tab, I see no reason at all for that not to be available for multiple items of the same kind.
    If not already done so, report these issues and dissatisfaction with the "new" metadata editors in 12.1 (and the absence of a "back door" for the old-style ones) using Apple's iTunes feedback page.

  • Why can I not select multiple items in Muse using Shift Click after installing update?

    I am trying to select multiple items on a Muse page by holding shift and clicking each items. This has been pretty much my standard method across Adobe products but after updating Muse it will no longer let me do this. Am I missing something or did this method change with the update?

    It seems to be happening mostly for Hotmail account.  I just rebooted and tested two accounts.  Only in Hotmail now.

  • Use "Update List Item" to add multiple Values

    I'm having a List on a SharePoint 2013 Farm.
    Each Entry can be a Member of a different Entry, and also can have multiple members.
    Now i want to Update my List Items with Orchestrator IP "Update List Item" and want to add this members to my List Element. If  i try it with one member, all is fine, but i want to add multiple Members to a List Entry
    i tried to seperate with commas, semicolon, spaces, line breaks.....
    For Example:
    My list Element will repesent my Business Services like Microsoft Exchange, Microsoft Exchange Mailbox, Client, Server......
    No i want to add to the List Entry "Microsoft Exchange" the members "Exchange Mailbox" and "Client"
    Any Ideas?
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

    Hi
    what i want to do is this
    when i configure my Activity to update twice, so one Activity vor "PowerClient" and one Activity for "A000001" only the last Entry exist, so it will overright the existing Entry.
    i am not sure how to configure the Activity to add multiple Values at once.
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • What is the best method for updating Bios for 8.1 on GT70 2OD

    Hey,
    I've been getting a bunch of different BSODs and its been recommended I update my bios because I am running win 8.1
    Im just a little confused with which method would be best to update the bios. The EFI bios utility method on the PDF looks easy enough, but the information above that says to use the flash utility in the compressed file. Is that the afuwinx64.exe file and I run it from windows? or can I do something with the .bat files?
    As you can tell I dont know to much about this kind of thing, I have been avoiding this update hoping to solve all issues without it, no such luck unfortunately. The feedback I got said that it seems as If something is misconfigured. in your opinion is it likely not having the bios updated could cause issues?
    Thanks.

    Use one of the methods outlined in the PDF files on the website from MSI. Either of those methods should work just fine.
    The generally recommended method though is using the BIOS HQ Flasher.
    >>Use the MSI HQ Forum USB flasher<<
    I would NOT just flash using the exe or the bat files, as this can cause issues if done improperly.
    I believe there was a bios update for the GE series of laptops because of a configuration issue for Windows 8.1. I don't believe the update for the GT series for Windows 8.1 had that same issue.

  • Best method for controlling Office 365 updates

    Were looking for the best method for updating Office 365. We will be testing prior to releasing the version to the rest of the company.  We have a couple of methods we're contemplating but looking for any pros or cons for each.  We are also
    using SCCM 2012.
    1. Run setup.exe setting the version and internal install source in an .xml file run as an SCCM package using distribution points as the install source.
    2. Run click2runclient.exe with command lines setting the version and internal install source as an SCCM package using distribution points as the install source.
    3  Set the version through group policy and turn on automatic updates and don't specify an install source.
    Option 3 appears to be the most straight forward with the least administrative overhead.  Would it be possible to revert back to an earlier version using this method?
    I have read various articles but looking for any input as to what is working well  or not working for others.

    Hi,
    I would like to share this
    blog post with you, which provides an example how to implement a fully automated testing and deployment process of Office 365 updates. This deployment method provides you the ability to test updates before you approve them in my environment.
    The process might look like:
    Deploy Office 365 in your environment with Office Deployment Tool, configure the "Updates" element in the configuration.xml file so that updates are enabled and the "UpdatePath" attribute points to an internal source.
    Download the latest Office 365 build into a different internal source, configure your test machine to pick up builds from it.
    After testing the updates, copy the updates to the first internal source.
    You should be able to integrate the process with SCCM to reduce your administrative effort.
    Hope this helps.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    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]

  • Most recent update changed all font sizes. What is best method to change back to to preexisting Fonts

    The most recent update changed all font sizes (smaller). What is the best method to enlarge?

    yeah, that's what I ended up doing late last night because the white font against pale gray background was driving me nuts. I hadnt changed anything. been using the same theme for about 4 months but then all of a sudden, like I said, the font color mysteriously changed.
    anyway, thanks for your help.

  • Update termination error while parking multiple items using BAPI fn module

    hi experts,
       i am facing a problem with bapi_incominginvoice_park.when i am trying to park invoice for single item for the po the invoice number is generating and getting updated in database in the same way when i am trying to park for multiple items the invoice number is genrating but not getting updated in database table.Here i am getting error 'Express document update terminated BY THE user'.How to solve this problem to find these error i have gone to se13 transaction,there it is showing SAQCL_DUPRC.it is saying duplicate errors in table but there are no duplicates in table.
    Thanks,
    Vinod

    hi vinod ....i tried the following it worked...
    while sending tax info dont send any tax table manually  i.e updating the vit_tax table using append statement
    also while testing function module for multiple PO , no need to provide the tax info in the tax table
    what we have to do is only to provide 'X' In the tax calculation option in the header details
    HEADERDATA-CALC_TAX_IND = 'X'.
    1.this will enable tax
    2. will make the po status green so that the parked document can be posted .

Maybe you are looking for

  • Wirelessly bridge AEBSn and D-Link (DIR-655)

    Hi, I'd like to use an AEBSn to extend the range of my existing 802.11n network (DIR-655 [Draft-N]) AP. I'd like to configure the AEBSn to use the same ESSID and WPA2-AES key as the D-Link and obtain the pertinent IP configuration from a server I've

  • Windows 8.1 update crashes my Lenovo Yoga13

    After updating to Windows 8.1, my PC is unable to restart with the following message displayed: 1) Preparing automatic repair 2) Diagnosing your PC 3) Your PC did not start correctly Here I am given 2 options: a) Restart b) Advanced Options. Option (

  • I deleted my recovery and hptools partition

    hi By mistake i deleted my recovery and hptools partition without creating a recovery disc. The disc which i got along with the pc says drivers and software but it only has operating system laptop model hp probook 6560b operationg system window 7 pro

  • SCP problems and No probl

    I have an X-FI XTREME GAMER installed on a AMD Nvidia 4 MB. I posted before that I have SCP issues playing BF942 well it appears that the problem occurs only in certain levels and not others. I have problems in B.O.B 942 and not in Lost Village DC pe

  • PS3 and M10

    I just bought a PS3 and although I have no problem connecting and playing online (set up was fairly easy or so) I want to make it more secure. I tried settings in PS3 and when it comes to choose WPA/WPSKA the device (PS3) asks me for a KEY So my ques