Hide Column in Sharepoint List - sharepoint

I am trying to hide a column in SharePoint 2007 list based on Users.
When user submit a request the status column should be hidden and the value set as pending.
When Admin logged in he/she should able to edit the status.
Is there any way I can achieve this with out writing CUSTOM CODE.
Any help would be appreciated.
Thanks
Deepu

No custom code makes it tough. What about creating two views. one view has the column and another does not. Then create two sharepoint web pages and add the first view with the column to one, and the second view without the column to the other. Then put a security group or audience on the pages, so the appropriate one shows up for the user. Not great, but could be an option.

I think you'll have to do something with a custom field type - this guy has a solution very close to what you need - however there is custom code involved.
http://www.infoq.com/articles/Dressel-Gogolowicz-wss-security
The only other thing i could think of is to deploy a custom fldtypes.xsl to the hive and pattern match against your column. Then perhaps you could do some for of xsl transformation to show/hide the column - not sure how you'd indicate if a user is an admin or not though.
You are really limiting yourself by ruling out custom code.
Best of luck,
Shane

Related

Setting up a Data View Conditional Format for MOSS 2007 that targets a specific group

I need to figure out a solution to allow only a specific group of users with permission to view a List Item in Editform.aspx. I created a custom form which would allow me to apply conditional formatting for a specific table row. I had used the advance formatting XPATH expression "ddwrt:IfHasRights(16)" which worked with any group that had contribute rights or below, but I also need to exclude other groups like tier 1 - 3, Site Builder, Designer, etc or above "Approval" status. The purpose is to only allow a very selected group of individuals (I created a group called "Approvers") to see the hidden table row.
The current working on MOSS 2007 standard version.
Thanks for any suggestions!
Jason
You can use JQuery and SPServices to examine the group a logged in user belongs to, see my post here which explains the principle. In that case, it hides an element if a user belongs to a particular group.

Sharepoint item locking after getting approved

I have a sharepoint custom list which has 5 columns ..the user should fill in first three columns and the other two should be locked for filling ..when the user enters the items and start the workflow if the workflow gets approved the 3 columns should be locked for editing and then the other two should be available for editing .
Can someone please tell me how can i achieve this.
Thanks
You'd need to implement either custom field types for the columns you're describing, or implement an event handler on the list with custom logic. Alternatively, you could implement a custom edit form for the list with the business logic for exposing fields as editable baked in, but you would need to ensure that your users do not alter field values via other means (external applications, data sheet view, etc.).
No out of the box fields support this, nor are there any list settings to enable such a scenario.

Sharepoint 2007 : How to set column level permission?

I would like to set the column level permission on list in Sharepoint 2007. I would appreciate help.
Example:
I would like to employee to fill other information in the form but not allow them to change the salary. Only admin can change certain fields.
You cannot do that.
SharePoint does not support column level security.
You would need to extend SharePoint to achieve this...
Take a look here.
http://code.msdn.microsoft.com/SecureField
Correct, there are no Column level premissions for SharePoint. However, a nice an easy workaround that I use all the time for this scenario is to create Custom List Forms and use the "display" option for the column to do not want users to edit. You then create an Edit form where the fields are editable for those that are authorized to edit the entry. Hope this helps.
I'm going to go out on a limb here, but I don't believe you have the ability to control permissions on individual columns in SharePoint 2007. At least I haven't heard of it. I browsed through list definitions and permissions but I didn't spot anything.
Another 3rd party tool is Sharepoint Column Protector by Datapolis. More details on the tool is discussed here (How to apply item level permission for sharepoint columns).
This is a common request for many SharePoint users, but MS does not provide. You can try 3rd party tools, such as BoostSolutions Column/View Permission and …

Sharepoint custom list, dynamic field?

Hey guys, just wondering if their is a simple way to create an Item in a custom list but i need that item to be dynamic. The user can click add more to get another field that would hold the same type of data an unlimited amount of time.
If i could even just add an excel spreadsheet type of field that would work also. But excel wouldnt need to be a requirement on the users machine.
I thought i had read somewhere you could do this using info path but i cant seem to find anything relating to it on google.
The InfoPath feature is called a "repeating section". There is information on how to set that up in Office Online.
If you wanted to achieve this entirely in SharePoint, the problem is that there can only be a fixed number of fields in a list. So you could create as many that would ever be used and just display all of those. Or to make it much nicer for the user incorporate jQuery to hide all of the fields except the first one and provide a button for them to click that unhides the next one.
There is good information on how to access list form fields using jQuery in the question How can I set the default value in a SharePoint list field, based on the value in another field?

Auto number column in SharePoint list

In a SharePoint list I want an auto number column that as I add to the list gets incremented. How best can I go about this?
Sharepoint Lists automatically have an column with "ID" which auto increments. You simply need to select this column from the "modify view" screen to view it.
You can't add a new unique auto-generated ID to a SharePoint list, but there already is one there! If you edit the "All Items" view you will see a list of columns that do not have the display option checked.
There are quite a few of these columns that exist but that are never displayed, like "Created By" and "Created". These fields are used within SharePoint, but they are not displayed by default so as not to clutter up the display. You can't edit these fields, but you can display them to the user. if you check the "Display" box beside the ID field you will get a unique and auto-generated ID field displayed in your list.
Check out: Unique ID in SharePoint list
If you want to control the formatting of the unique identifier you can create your own <FieldType> in SharePoint. MSDN also has a visual How-To. This basically means that you're creating a custom column.
WSS defines the Counter field type (which is what the ID column above is using). I've never had the need to re-use this or extend it, but it should be possible.
A solution might exist without creating a custom <FieldType>. For example: if you wanted unique IDs like CUST1, CUST2, ... it might be possible to create a Calculated column and use the value of the ID column in you formula (="CUST" & [ID]). I haven't tried this, but this should work :)
I had this issue with a custom list and while it's not possible to use the auto-generated ID column to create a calculated column, it is possible to use a workflow to do the heavy lifting.
I created a new workflow variable of type Number and set it to be the value of the ID column in the current item. Then it's simply a matter of calculating the custom column value and setting it - in my case I just needed the numbering to begin at 100,000.
it's in there by default. It's the id field.
If you want something beyond the ID column that's there in all lists, you're probably going to have to resort to an Event Receiver on the list that "calculates" what the value of your unique identified should be or using a custom field type that has the required logic embedded in this. Unfortunately, both of these options will require writing and deploying custom code to the server and deploying assemblies to the GAC, which can be frowned upon in environments where you don't have complete control over the servers.
If you don't need the unique identifier to show up immediately, you could probably generate it via a workflow (either with SharePoint Designer or a custom WF workflow built in Visual Studio).
Unfortunately, calculated columns, which seem like an obvious solution, won't work for this purpose because the ID is not yet assigned when the calculation is attempted. If you go in after the fact and edit the item, the calculation may achieve what you want, but on initial creation of a new item it will not be calculated correctly.
As stated, all objects in sharepoint contain some sort of unique identifier (often an integer based counter for list items, and GUIDs for lists).
That said, there is also a feature available at http://www.codeplex.com/features called "Unique Column Policy", designed to add an other column with a unique value. A complete writeup is available at http://scothillier.spaces.live.com/blog/cns!8F5DEA8AEA9E6FBB!293.entry
So I am not sure I can really think of why you would actually need a "site collection unique" id, so maybe you can comment and let us know what is actually trying to be accomplished here...
Either way, all items have a UniqueID property that is a GUID if you really need it: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.uniqueid.aspx
Peetha has the best idea, I've done the same with a custom list in our SP site. Using a workflow to auto increment is the best way, and it is not that difficult. Check this website out: http://splittingshares.wordpress.com/2008/04/11/auto-increment-a-number-in-a-new-list-item/
I give much appreciation to the person who posted that solution, it is very cool!!

Resources