Design question - how to update a list?
Hi there,
design question: I have a table with the following columns:
1. id
2. ref_number
3. ticket_number
example:
1 60 234
2 60 256
3 60 664
4 60 237
consider this - user can see on the screen the list of all tickets associated with ref_num (in the example above everything associated with 60)
now I would like to UPDATE the list. The user might have added more to the list or, alternatively, remove from the list.
The easiest thing to do is to DELETE all the list with ref_number=60 and then do INSERT
Q: is this ok? if not, how would you update such a list if I don't have the id's of every row?
thanks
If you want to write code that's easier for you to write, you do whatever the hell you want.
If you want to write good code, retain the ID.
Similar Messages
-
Workflow - how to update multiple list items
Is it possible to update up to 3 list items with the same information using a workflow? My scenario is where a company vehicle (registration number) has up to three drivers assigned to it - Driver Name 1, Driver Name 2 and Driver Name 3. I
have two separate lists - one for vehicles (fleet list) and one for drivers (driver database). In my workflow when an item is created or changed in the fleet list, I would like the current vehicle registration to be updated in all three driver records
in the driver database. I am not sure if I can do this as I am unsure of what my unique look up would be as I need to be able to tie a vehicle registration to a driver name. Any advice would be much appreciated.
ThanksHi,
Refer to the following threads about how to update multiple list items simultaneously.
http://social.technet.microsoft.com/Forums/en-US/936d05ba-6e86-4f44-bbdb-b3c5c12b2c68/how-do-i-update-multiple-list-items-at-once-in-a-sharepoint-list
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d342b01-1978-40c9-a203-303d145b331e/how-to-update-mulitple-list-items-at-same-time
http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d5b7424-58dc-470b-8142-90755dbdeaae/sharepoint-workflow-change-multiple-items-in-other-list
Thanks.
Tracy Cai
TechNet Community Support -
Question:- How to update the Adobe Air Application Version.?
Question:- How to update the Adobe Air Application Version.?
Change the namespace declaration in the application descriptor.
For example, to update version 1.0 to 1.5, change:
<application xmlns="http://ns.adobe.com/air/application/1.0." ...
to:
<application xmlns="http://ns.adobe.com/air/application/1.5" -
How to update my list of bought products
a quick question
how can I remove products from my app store list
that I've downloaded for test purposes and removed from my Mac
thx in advance for the info
gr.HennyHi,
Not possible. They are also viewable in your iTunes account.
Launch iTunes, from the menu bar click Store / View My Account the click: Purchase History.
Carolyn -
How to update 500 list items using Rest API
Hi All,
i have requirement that is "required to update 500 list items using rest Api".
how can i do it,please share your thoughts with me.
Thanks,
Madhu.Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development -
How to update selected list items in SharePoint 2010?
Hello All
I have a list containing field named "Category". I want to develope a solution which will take two inputs: Old Category and New Category. The expected result is: all the list items will be fetched which have Old Category input value in
their category field and the field is replaced with the input value New Category.
I have a limitation that I can not use Visual Studio. So I am thinking to create aspx page with content editor webpart. But I am new to all these things. Could you please suggest the development approach for this?
Thanks.Hello,
I don't think CEWP can help you because you won't be able to find old and new category when there is any change in list. However you can identify the latest modified item from list but how will you identify whether category is old or new. If you have any
other column in list which can tell you that category value has been updated then you can write ECMA or Jquery script to update other items.
If have any column in list then see below jquery code, where you will see how to query the list: (In my case it is Active)
var soapEnv = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Body><GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>";
soapEnv += "<listName>Highlights</listName>";
soapEnv += "<query><Query><Where><Eq><FieldRef Name='Active' /><Value Type='Text'>Yes</Value></Eq></Where><OrderBy Override='TRUE'><FieldRef Name='Modified' Ascending='FALSE' /></OrderBy></Query></query>";
soapEnv += "<viewFields><ViewFields><FieldRef Name='Title'/><FieldRef Name='ows_FileLeafRef'/><FieldRef Name='Links'/></ViewFields></viewFields><rowLimit></rowLimit>";
soapEnv += "</GetListItems></soapenv:Body></soapenv:Envelope>";
Please comment if i misunderstood you?
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
How to update SharePoint list columns including choice fields programmatically?
Hi All,
I have a requirement to update multiple columns (which are choice columns) in a SharePoint list. I'm a newbie at creating event receivers and timer jobs. Not sure which one to do and where to start first. There are approximately 4500
list items in the lists. I was thinking I could use one list to maintain the Keywords and perform updates or timer job to any targeted lists.
Scenario. Anytime a power user of the sharepoint list wants to update any of the choice field items or possibly even the column name itself, they want to be able to make updates to any of the list
items or other
lists that contain the new name. The columns I'm using are all choice fields named Assigned To, Division, Region, Job Title, Department, and Zone.
Here's sample code for Updating list:
using (SPSite oSPsite = new SPSite("team url/"))
using (SPWeb oSPWeb = oSPsite.OpenWeb())
oSPWeb.AllowUnsafeUpdates = true;
// get the List
SPList list = oSPWeb.Lists["Keywords"];
//Add a new item in the List
SPListItem itemToAdd = list.Items.Add();
itemToAdd["Title"] = "My Title Field";
itemToAdd["Assigned To"] = "Assigned To";
itemToAdd.Update();
// Get the Item ID
listItemId = itemToAdd.ID;
// Update the List item by ID
SPListItem itemToUpdate = list.GetItemById(listItemId);
itemToUpdate["Assigned To"] = "Assigned To Updated";
itemToUpdate.Update();
// Delete List item
SPListItem itemToDelete = list.GetItemById(listItemId);
itemToDelete.Delete();
oSPWeb.AllowUnsafeUpdates = false;
Any help is greatly appreciated. Please provide code sample and references. Thanks!Thanks Ramakrishna -- Here's what I have so far.
namespace MonitorChanges
class MyTimerJob : SPJobDefinition
public MyTimerJob()
: base()
public MyTimerJob(string sJobName, SPService service, SPServer server, SPJobLockType targetType)
: base(sJobName, service, server, targetType)
public MyTimerJob(string sJobName, SPWebApplication webApplication)
: base(sJobName, webApplication, null, SPJobLockType.ContentDatabase)
this.Title = "My Custom Timer Job";
public override void Execute(Guid contentDbId)
// Get the current site collection's content database
SPWebApplication webApplication = this.Parent as SPWebApplication;
SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];
// Get a reference to the "ListTimerJob" list in the RootWeb of the first site collection in the content database
SPList Listjob = contentDb.Sites[0].RootWeb.Lists["ListTimerJob"];
// Add a new list Item
SPListItem newList = Listjob.Items.Add();
newList["Title"] = DateTime.Now.ToString();
newList.Update();
Talibah C -
How to update the lists using the timer jobs?
Hi,
I'm new to sharepoint developing
Using the timer jobs the items which are present in the one list must get updated in the another list and also should be overwritten.
For example:
If there 10 items present in a X list. After some time period the first five of X should get updated in Y list . After some more time the next 5 items of X has to overwrite the items present in the Y list.
Regards,
Santto.Hi Santto,
The following articles and code examples would be helpful.
SharePoint 2010 Custom Timer Job
https://code.msdn.microsoft.com/office/SharePoint-2010-Custom-416cd3a1
SharePoint Add/Update/Delete List Item Programmatically to SharePoint List using C#
http://www.sharepointblog.in/2013/04/add-new-list-item-to-sharepoint-list.html
Best Regards
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 to update a list item through Sharepoint Designer Workflow?
Hi,
I have a created a list, in which "Completion date" column is there.
Now I want to update column "Completion Date" through SPD, specifies value(date) after 10 days of created date of a record in list.
Please help.
Thanks in advanceHi,
You can use the "Build Dynamic String" action to convert the date field to a string,
And use string comparison to determine if the date is blank
For more information, please refer to
http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!498.entry
Hope this helps
Thanks!
Stanfford -
How to update a list in parent view with data from child view/window ?
I have a view named AccountListView that displays some buttons and a list of accounts.Its viewmodel is called AccountListViewModel and has a collection : ObservableCollection<AccountViewModel>. What I'd like to acomplish: whenever I press the Add/Edit
Button from the AccountListView to open a new window/usercontrol, i.e. AccountView and bind it to an instance of AccountViewModel that will have some fields to fill in and a Submit and Cancel buttons. How can I update the ObservableCollection<AccountViewModel>
from inside the child view, so when I click on the Submit button from AccountViewModel it will return an AccountViewModel object with the data I filled in and add it to the observablecollection. Would notifications from prism be the right way ? Should
I include code from the AccountListViewModel and AccountViewModel ?The way to communicate between view models in Prism is to use the EventAggregator. You raise an event from view model A and subscribe and handle this event in view model B. I have written a blog post about it which should be helpful here:
http://blog.magnusmontin.net/2014/02/28/using-the-event-aggregator-pattern-to-communicate-between-view-models/.
In your case you could define an event that carries an AccountViewModel object and pass this one from view model A to view model B:
public class AccountViewModelEvent : CompositePresentationEvent<AccountViewModel>
Please refer to the blog post for more information and a complete code example.
Hope that helps.
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread. -
How to update agent list after triggering workflow?
Hi Guys,
Is there any function module to update the agent list after triggering the workflow? i mean after triggering workflow, the user is maintaining some approving officers in their table and they are expecting the workflow should route the workitem to those newly maintained approving officers. So can any one help me to solve this issue.
Regards,
Safiqif any agent maintained in the customized table, how can I update
those agent with existing available agent list.
It sounds like updating the existing workitem container with the new updated values. right? You mean to say initially workflow is triggered and the agent list is populated in the workflow container. But after the workflow is triggered if the table is updated with some new entries, then these new entries must alos be included in the agent list container element in the workflow container.
If this is the case the you have to modify the multiline container element of the workitem container. You can make use of the standard function module SAP_WAPI_WRITE_CONTAINER but this function module needs to be called each time when evenr a new entry is created and you have to check what are all the workitems that you want to update ,
I think its a bit difficult to update all the workitems which are with reagrd to this scenario.. so you have to check out some other simple way. But on a whole what I can say is you can update an existing workitem container by using the FM mentioned above... -
How to update device list in MAX ?
Hi all,
I'm running MAX 4.0.3 and trying to declare cFP module (that I still haven't received).
I'm expecting :
2 RLY 421 modules,
1 AI 111,
1 DO 401,
they'll be connected to a cFP 2020.
The thing is when I try to add a device I have to select from a list but RLY 421 is not in that list..
How can I update MAX's device list ??
Message Edité par TiTou le 07-19-2006 04:21 PM
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Attachments:
cFP.jpg 21 KBHello,
I've just installed FieldPoint Driver 5.0 downloaded from NI website but the RLY 421 is still not in the device list ...
Before starting to develop I thought I should update my drivers so I got the latest FP Driver version, but since I'm still using LV 7.1 maybe I shall unistall FP Driver 5.0 and re-install 4.1 and see if it works ?
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!" -
Question: How to update app with a new version with new SQLite tables?
We're updating an application in the App Store, and haven't yet found good information on how to deal with updates to the SQLite Schema and data that should be transferred between apps.
Anyone successfully done this?
Q1: Does the old DB files stay on the iPhone after update? Does the installer do a "diff" between them? In our case, we just extended tables, rather than changing them, in hope that we can successfully move the data for users gracefully.
Q2: If the installer does in fact wipe all the data and files on the app before install, is there a way to access the data before it updates, so the app can gracefully update the data?to Templeton Peck:
Good Sir,
I would thoroughly appreciate you responding in a helpful manner rather than punishing my question with no regard to my question. Your harsh, quick, and false judgement was certainly not appreciated here. In regards to the macbook release: I was simply wondering IF there were releases of information that I had not heard of. I wasn't asking you to spill rumors of never released info.
Maybe you should read this material a little more carefully without hastily looking forward to ripping apart a wondering mac user.
But in regards to the SQL, I enjoy the following:
UPDATE table
SELECT........ -
How to Update Comment List in Reader
I have written a plug-in that manages user annotations. The issue that I have is I am able to manipulate the annotations on the page, but the information in the Comment List does not update. Is there a seperate array for what shows up in the comment list or is there a call that I can make to refresh the comment list?
Any assistance is very much appreciated.
GregoryHello,
I've just installed FieldPoint Driver 5.0 downloaded from NI website but the RLY 421 is still not in the device list ...
Before starting to develop I thought I should update my drivers so I got the latest FP Driver version, but since I'm still using LV 7.1 maybe I shall unistall FP Driver 5.0 and re-install 4.1 and see if it works ?
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!" -
How to Update Task List..?
Hi All,
I need to update the standard work hours for a group of task lists.Could somebody please let me know if there is any BAPI or Function module to do this or any user exit.
Thanks in advance
Cheers
NishanthHello,
It is better to fulfil this requirement by Recording ( either BDC or LSMW )
If you have a beg set of data and if this is a one time job, you can use 0170/0001/RCPTRA01/B. SAP gives a detailed program documentation about various options.
There are also other objects to update the Equipment Task list, Funcational location tasklist.
Hope this helps you.
Best Regards,
Murugesh AS
Maybe you are looking for
-
A dynamic Team Planner View to concurrent users
Hello, I currently have MS Project Professional 2010. Our business is looking into possibly upgrading our system but we need the team planner view in whatever we choose. We currently have hundreds of projects and thousands of tasks linked to resource
-
Is there a way to load a PDF file into a symbol on the stage that does not require an internet connection?
-
Purchase Order, MIGO and MIRO
Dear All, Please guide me how to map the below scenario in SAP. We have to procure Material 'C' for that we have to get the Material 'A' from "X" Vendor. And it has to be delivered to "Y" Vendor. Then vendor "Y" uses Material 'B' and he does some pro
-
BW 3.5/2004s Portal KM Integration
I am trying to create an index on BI Metadata and BI Documents repositories that are running on a BW 3.5 server. The portal is 2004s. The repositories seem to work properly; I can browse into the various metadata folders and view/edit documents spe
-
I've been flogging a lot of articles on the forums lately, and here's another: http://www.desktoplinux.com/news/NS2761311745.html Author Steven Vaughan-Nichols discusses desktop development of Linux with Eric Raymond. I was particularly interested i