Adding Sharepoint list column that is populates dynamically from items - sharepoint-2010

I have a SharePoint list that has a bunch of colunms. I need to ad an additional column. This column needs to be populated with the numbers of the items in the list, i.e. 1 - n-th.
I'm not sure how one would do that. Would I need to create it using simple SharePoint or using SharePoint Designer?

There already is such a column — ID. It's automatically assigned from a counter. However, when you delete an item, a gap in numbering emerges.
And no, you probably can't create a similar but custom column using plain SharePoint or SharePoint Designer. You would need to create an event receiver do assign the values programmatically.

Related

Adding Sharepoint 2010 List Items to a List with external Items

I have a list in SharePoint 2010 that has external items.
It is easiest to explain the specific scenario.
We have sales orders that have information that is being pulled from our MRP system.
The unique key is the Sales order number.
There are several columns in the list that do not come from MRP that show the status of the order on our production floor.
The way that it works now, every time a new sales order is created, the user must go to the SharePoint list, click new item, type in the SO number, click the check external item button and click ok which subsequently populates several fields in the list..... Then someone out on the floor populates the rest of the info
The part in bold is what I would like to automate.
I understand it may need to be a stored procedure or some powershell script.
The issue is, that because of the external content type in the list, all of the canned SharePoint tools wont allow me to feed data back into the list.
One option is to create an SQL server trigger. This trigger would fire whenever a new sales order is created in your source database. You could make it a CLR trigger, and in the function make use of the SharePoint client interface.
After you provided a clearer description of the problem: I believe that you're looking for something like the list event handler. This will run on the events you care about, and you can pull from the database at the appropriate time.
Essentially, you need to make a Visual Studio SharePoint project (from my past experience this method requires you to use VS right on the SharePoint server, or else you have to copy a lot of DLLs manually from the server); and make an event receiver.

How do I detect whether a SharePoint calendar item has been changed in Outlook or via the browser?

I have a SharePoint calendar which users can connect to and view/edit in Outlook. I want to be able to create a workflow that is fired when an item is changed or updated and then use an If statement to determine whether the change was made in Outlook or via the user's browser. Is this even possible? I cannot use a code based solution (much as I would like to) as I do not have access to use one.
Having scoured the net, it would appear not. The only way that I have used before, but it is clunky, is to create a field that can only be edited in SharePoint and an identical table that holds the previous version. The workflow can detect if the SharePoint only field has changed in relation to previous value held in the other table, and use this to direct to SharePoint only or Outlook only code as required.

Lookup a People/Group column in SharePoint 2010

I know it's one of the limitation to use person column as lookup in another list but is there any work around ?
I have figured out a way using InfoPath forms on a list. It's a little involved. Are you still interested?
The basics involve setting up a secondary data connection to the lookup list and using rules in InfoPath to populate the people picker fields (DisplayName, AccountID, AccountType).
I've also found that you have to hide the people picker controls until there is data in them, otherwise they don't display anything even though there is data in the underlying fields.
I could spend a little time documenting the procedure if you need it.
-Doug

Sharepoint 2010 populate dropdown list with site users

I have a small problem that I need to deal with. I have to create a form in SharePoint Designer 2010 with two fields: User name and Group. These are dropdown lists from which the user can select user and group and save the user's ID and the group's ID in a SQL table. The problem is I do not know how to populate the list with the information needed: Users names, based on their IDs and Site groups, based on their IDs, all from the current site. Do you have ideas?
This is not something you can achieve through SharePoint Designer. SharePoint Designer is made with Power Users in mind. What you are looking for is more of a developer task. As such, you would need to use Visual Studio.

Best way to deploy lists to Sharepoint 2010

OK, we're just starting our Sharepoint development, and I'm a little stuck on one item. We obviously have a development and production environment. When creating custom lists, do you create a list in both locations, or do you create the list in code? If you create it in code, do you first check to see if it exists, and if it doesn't create it?
do you create a list in both
locations, or do you create the list
in code?
You can use List Definition to create Custom Lists programatically. This will be faster than creating manualy if you have lists with large number of columns.
You can also check if this list exists, programatically, and if not use this template to create the list.