SharePoint 2010 List - Need direction - sharepoint

I'm a coldfusion developer, and I've been asked to rewrite a coldfusion application for SP 2010. I have no SP experience, but I'm now the SP admin.
My application is a waiting list for customers that enter a service center. The customer is entered into a List that tracks the following:
Name
Location (drop-down list of physical store locations. no multiple/custom values)
Check-In Time (timestamp for when customer was added to list)
Service Required (drop-down list, not allowing multiple or custom values)
Staff Member Requested (option, user select box)
Time Seen by Staff (timestamp when list item edit begins)
Seen By Name (name of user that edited record)
Time Finished with Staff (timestamp when list item edit is saved)
There are a few pieces of functionality that I don't know how to build into this list.
1
The records on the list view must be automatically filtered by the location column. The location to be viewed should be based upon the users group membership. (one group per location)
The Time Seen date/time field must be a timestamp that occurs when the list item is opened for editing.
The Seen By name must be automatically entered when when the user opens the list item for editing.
The Time Finished timestamp must be automatically entered when the user saves the list item after editing.
I don't expect anyone reading this to create this for me, but I would truly appreciate any tips, suggestions, or tutorials you can point me towards that will help me to accomplish these goals.

You will have to create such a list with the SharePoint Administration. You have several possibilities to do this. You can build them in you web browser using your SharePoint Site with the necessary rights, you can use the Microsoft SharePoint Designer (similar, less functionalities but in my opinion easier to use) or you could deploy the list after you built it in Visual Studio (best solution if you want to deploy it on more than one server or you want to change your list afterwards, but difficult).
There are some things you have to know: A list manages one or more content types. A content type is a collection of columns that contain the types (and more information) of your data. There are templates for content types and columns, but you will have to create your own content type and maybe some new columns as the templates might not be enough for your demands.
I'm not sure how to manage your first point. There is definitely a solution but I'm beginner, too.
The other 3 points could be managed by workflows: You can define workflows for a list, that do things after an item of your list is created or edited. I'm not sure if this will be useful for your 2nd point.
Another possibility would be to build a webpart, but that wont be a solution for a coldfusion project as I think. In a webpart you could handle all the interaction that are made by an user and change your list item individually.
A third way is to build an event receiver (using Visual Studio) for your list, but then you would have to build your list with the help of the VS as well.
I'm sure that won't answer all your questions but I hope you have some directions that you can inform about.

Related

SharePoint Online and prevent users from editing old list items after specific time

We have SharePoint Online site with list. Users can add, edit and delete own items in this list.
How I can resolve new issue - Users can't edit and delete own items older than one week (from creation date).
Is it possible without coding Remote Event Reciever or Azure function?
Per my knowledge, there is not an OOTB way to achieve it, we have to write some custom code.
If you only want to the user can't see some items in list view base on some condition, we can use list view Filter to achieve it. Note:User also access item form through URL.
I suggest you use remote event receiver or azure function to achieve this requirement.
In classic site, we can also add some JavaScript code into master page to prevent users access edit form page and hide the delete button in the page.
For this kind of requirement the solution which is 'no code' and with SP online is Power automate (previously MS Flow).
The best option in Your case would be to create a recurring flow which for example starts every day at 00:10 AM -> please see MS docs with description how to do this.
The Flow should get all items from a specific list for a specific site. You can do that with the 'Get Items' step. After that You can use the 'Apply to each' Step to check each item creation date with a 'Condition' Step. When some item will be older than one week You can use additional steps to break permission inheritance on item and remove all groups from permissions on this item or change the permissions on item from edit to read. Here I found an interesting article where are some predefined steps shown how to remove all permissions, remove and add a group. To tell You the truth I was not aware there already are this kind of steps in Power automate (maybe something new :) ) .
I would use SharePoint HTTP request and use SharePoint API to remove permissions on item and change some group role from edit to read. So I would do a similar procedure like here the only difference is not to break permission on all list but just on a specific item which I would get by ID. You can do all of those API request with a 'SharePoint HTTP request' Step
Please be aware there usually is a 5 000 unique permission levels threshold (50 000 is in on-prem) in list (place check here for latest info on limits in SP Online). So a better option would be to create a folder with view only permissions for the users before and when an item is older than one week You could only move this item to that folder also with Power Automate. That way all the files (items) in this folder would be read only and You would have only one unique item scope in this list and not as many as the old items.
Some other options You could use are:
Also code solution, but not RER and Azure function, would be to create a console app that uses CSOM to look through items in this list and either breaks permission on each item or moves to a folder (like the flow) and schedule this CSOM app on some local or remote server in Task Scheduler... Of Course You would need some local (or other) server for it which is always up and running :)
If You would like to use some 'little coding' and by any chance You are still using classic UI (not modern) You could use JSLink attached to CT or some column like Title and block editing of fields in edit forms etc (this is not the best option as always the users may create a view without a columns with this JSLink and go around this or modify the item using CSOM or Rest API)
You might consider using PowerApps (In case you have it configured in your subscription) to customize the edit form,
Then you use the validate() method, and disable a user from submitting the form in case ("Created" + 7 days) <= Today() or something like that.

Sharepoint 2007 - List ID Function

I have read many posts that say the automatically assigned list ID number in Sharepoint 2007 does not change.
It is very important that the list items in my sharepoint site stay in the same order as when they were originally created. My initial image was that I could sort on the ID # to keep the list in order (since it wasn't supposed to change). It has not worked out. I have noticed that the ID changes and my data gets out of order.
Could anyone please explain to me how the automatically assigned ID # works in Sharepoint 2007? How/When is it assigned, reassigned? Is there an action that causes the # to change?
When a workflow runs does Sharepoint reassign the item w another ID#? I do have several workflows running on this site.
A list item id is just like a SQL identity column. It is automatically incremented, is (or should be) unique within a particular list and doesn't change. Are you able to identify a point in your process where you are seeing an id change?
maybe you can take a look at the back-end sql server, there is no way you can manupilate it on user interface or object model as i know.

SharePoint 2010 multiple users accessing same list issue

We have a list with 1000+ phone numbers in it. This list is sorted in a specific order by due dates and other criteria. This order is very important and needs to be maintained in the solution.
We have a group of callers (roughly 4) that will be calling the numbers in this list in the order they are sorted by. These callers are to be presented with one list item at a time, via an InfoPath form, and once they make the call they will update the list item and be presented with the next list item dictated by the sort order.
Here's the problem: This would be very easy with 1 caller but with 4 callers we don't want them calling the same people more than once. So they need grab the next list item off the top of the pile that isn't already taken by another caller.
Is there a way to build a webpart (remember without Visual Studio unfortunately) that as soon as it loads would find the first list item that is unassigned and assign it to the current user?
We could accomplish this whole thing manually of course by having an admin assign all the calls each day with a large copy/paste in Datasheet View but automatic would be soooo much better.
I will mention that I DO NOT have Visual Studio so I don't have that as an option here. But I do have SharePoint 2010, SharePoint Designer 2010, and InfoPath 2010.
I hope this makes sense and any ideas, thoughts, approaches would be greatly appreciated since I've run out! Thanks!!!!!
You can develop SharePoint web parts using Visual Studio Express, but its a bit harder as you miss some of the tools that make your life easier like WSPBuilder etc.
SO - Building webparts with Visual Studio 2010 Express
Another alternative would be to use javascript client side to access SharePoints Web Services via SPService - then nothing more than notepad is required.
You're really using a wrench as a hammer with either of these approaches though, so I've got to say - how much do you value your time at? ;)
I can offer a very bodgy alternative; presuming all the items are added piecemeal (not in the same second). You could add a calculated column to assign each item at random on addition, using the following formula:
CHOOSE(MOD(SECOND([Created]),4)+1,"Operator1","Operator2","Operator3","Operator4")
I suggest a workflow that is assigned to listItem's edit; that when a caller edits its extra field like "Operating(bool)" after the calling workflow completes; the item is disabled somehow.
Only overhead of this is a caller needs to edit the item every time.
But the easy part is a listviewer webpart (oob) can be used just with a default view setting like "Operating" field is "false" only.
This is simple. On form load, instruct the form to update a status field to (let's say 'assigned') and automatically resubmit the form back. Your infopath list that pulls in the next number to call would need to exclude any that are in the assigned status. You'd also need to re-query your data connection to refresh the list each time before a call is made to grab the next available. Once the caller is finished, they can click a button that submits the form, clears the status field and closes the form.
Yo can also pull in the active items into an infopath form using a secondary data connection. There is a way to use the insert hyperlink into the form field, and make any of your fields a URL hyperlink directly to the individual item. Although you'd have to have the URL epsaved in a field in the form the item was created in. That's easy to do, you can just con at the URL with the form name.

Aggregating news with Sharepoint MOSS 2007

Our company is split into divisions. These divisions work for client companies and are then further split into account teams that work on projects for a product of the clients.
So the structure goes Division > Clients > Accounts > Projects. And this is mirrored in the setup of our sharepoint installation. At each stage from Division to Account there is a subsite. Access to each subsite is controlled by AD groups and on each subsite there is a 'latest news' announcements list
What we want to do is have a 'wall' of announcements that feeds through so that each user can see on the top-level site all the posts in all of these anouncement lists, but this must be filtered using the AD groups that they are a member of so that confidential information isn't shown to someone who shouldn't see it.
Can anybody think of a way to do this?
Let's see - are those lists split accross site collection? With what tool you want to accomplish this?
You have several options (if you are within a site collection):
Use Content Query Web Part to
aggregate list items. You can
customize it to display fields
you like the way you like.
You can use SharePoint Designer.
Using Object Model/WebServices: Use
SPSiteDataQuery class to query
multiple lists at once and then
SPGridView to display data.
As you have a MOSS build, you could
even use CrossListQueryCache.
It's also a cross list query that
has builtin caching and audience
targeting. Be sure to read this to be sure caching is working.
If you want to aggregate between multiple site collections, then you will need to write code that get's all your SPSite objects and execute SPSiteDataQuery on them.
Maybe you can find out some additional information on Rollup of all Tasks of a Recurring Meeting in SharePoint
Here is how we are doing it.
Set up a content type for each level of announcement. We have national, state, district and the basic site level announcements. Therefore I have 1 national content type, 10 state content types (because we are in 10 states) and 1 content type for each district. All of these content types inherit from the base Announcement type with no modification.
I added a content query web part. I exported it. I edited the XML in the .webpart file to point to a new custom ItemStyle_Announcements.xsl file I had created. I import the modified .webpart and delete the default Content Query Webpart.
I modify the ItemStyle_Announcements.xsl to create the structure and divs I need for the styling. I add styles to the default style sheet I have already created for my site to get the look and feel I want. (I happend to have two styles for these, one featured/most recent item which is big and full, then a listing the next 10)
I find an announcement list that will possibly post to the national new. I add the content types as needed. Now the end user can choose what scope of announcement they want from the New menu.
This remaining issue is that right now, the States and Districts must have TWO announcement webparts on their home pages. One that lists everything local to that site (regardless of scope) and one that has unit announcements aggregated from the other sites in the same state / district.

SharePoint "Group By" is broken when using "Allow Multiple Values" for a column

I want to show the documents in my document library grouped by category. The category is a lookup column that I added that allows for multiple values. Unfortunately this breaks the "group by"-functionality completely. Is there a programmatic solution to this problem?
There is one way... It's complex and ugly - but it should work :)
It is possible for you to write you own view for at list (HTML, JavaScript and all). The VWSTYLES.xml file in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\GLOBAL\XML folder, contains the HTML and JavaScript for the default SharePoint view styles - getting your inspiration from this, you can create your own view style, where you can do anything you want!
The problem is, that SharePoint don't have any way to deploy your custom view style - this is where the ugly part comes in - you have two options for deploying your view style.
Add you code directly to the VWSTYLE.xml/Edit a copy of it and override it with a feature
Pros:
You will still be able to edit the
view from the SharePoint interface
Cons:
You override a default SharePoint
file - your work can be overridden by
a SharePoint update.
Your view style will be available on every list in SharePoint.
Create your view programmatically on the list
Pros:
You don't override any default
SharePoint files.
You can control which list uses your
view
Cons:
You wont be able to edit the view thru the SharePoint interface
I've used method 2 a couple of times myself - and it works... but it's not pretty! :)
I don't think what you are trying to do is possible. When grouping items/documents, you display them in different groups based on a grouping value. I don't think SharePoint has support for adding a single item to multiple groups. With multiple values in the grouping field its' impossible to know which group to add the item/document to. I am not sure if this is an error or if it's by design.
Thomas is correct, this is by design as the item would have to appear multiple times in different groups. It is worth noting that this is possible via the web services, however.
See why I was getting duplicate rows from the sharepoint lists web service
And no, I've no idea why the lists webservice will do it, but the API won't.
Check out this link as well. Access supports this functionality without having to do much ugly code. http://office.microsoft.com/en-us/access/HA012337221033.aspx
So here is a sort of hack that has worked for me, no guarantees though. While your column (Office in my case) has allow multiple values enabled, fill in all of your data as needed. Once done, go to List Settings, click the Column "Office", and turn off allow multiple values. SharePoint will pop up a warning about how this data may be lost (never happened to me). Hit okay, then modify the view you want grouped, "Office" should now show up on the drop down of columns to group by. Finished result will result in your groups (and or sub groups) showing up just fine.
The only qualm I have is that instead of having an item show up in both Group A B because it had both field A and field B checked in Column X, it just creates a new group, Column X: A; B. So in my case, I have staff in both Beaufort and Orangeburg Offices, instead of having those staff in both groups (preferable) it creates a new group as below:

Resources