1

I have created a library in which i am using the drop down column with some values.These Values will depend on the group to which the user belongs.

For Eg.

If Drop Values are A, B , C, D, E

and there is a Group XYZ

If User A logs in & he belongs to Group XYZ the Drop down should show: A B E

Else the drop down should show : C, D

That I have done by taking the help @Per. The way I have done is :-

Lookup list, if for entry into list

If you can make an extra group ZYX which contains everybody except the people in XYZ then you can make the following:

1.Create a list with the choices A,B,C,D,E

2.On each item break inheritance and assign view right to groups XYZ and ZYX

3.Make your dropdown a lookup into the list

Now what i want is , if the User 1 logins which belong to group XYZ. The Option visible are A,B,E. Then as the user select the option A, then after when he goes into the drop down again then he will not able to select the option A again...!! The samething i want in options A, B, C, D except E.

In nutshell i want is that the user only select the drop down options only Once in the Editform.aspx...!!

Kindly share your Views...!!

Thanks in Advance

Kishan

4
  • How many users are there going to be of this site? Commented Apr 5, 2012 at 21:46
  • The Total user will be around 1500(simulataneous access )...!! But the Condition is totally based on 2 groups.
    – Kishan
    Commented Apr 5, 2012 at 21:54
  • Honestly this is a work around, but you could always use JavaScript Commented Apr 6, 2012 at 0:02
  • Meyer I have used Jquery. I am Trying ...!! :(
    – Kishan
    Commented Apr 7, 2012 at 0:58

2 Answers 2

0

I advise you to create a custom field that renders your control in the edit and new and display forms and allows you to implement any behavior. Furthermore you will be able to have custom properties for your field thus store there which options are available to whom. So no Lookups and permissions inheritance braking. If you're interested you can find a lot of samples on the internet like this or even better.

0
0

If you only had a few users (which isn't your case) then I'd suggest give rights to the select option to the individual users and then remove/add these rights in EventReceivers. This is the easiest way, but won't work with many users.

As you have a lot of users my only suggestions are:

Option 1: Javascript
Add javascript to the form which:

  1. Uses the Client Side Object Model to find items created by the current user which has option E
  2. Uses jQuery to remove the options from the drop down

Option 2: InfoPath/custom aspx
Change the form to InfoPath/custom aspx and run similar code server side.

4
  • **Much Thanks @Per ** I have used the Option E common for both groups. So it's bit more complicated...!! (If I manipulate my requirement) Tell me one thing... If i want to use a common Scenario for all users..... Any user from any group select any drop down value it will be disabled/invisible after their selection. In Short the option selection is available once only for any user..!! Then do you think it's possible by using the Jquery...!!.. Continue to next post...
    – Kishan
    Commented Apr 7, 2012 at 1:15
  • I have tried by JQuery I am able to get the drop Value id in alert Box. So is there a function so that i can make disabled the option...!! The Code which i have used is : $(document).ready(function() { $("#btnGetDropDownValue").click(function() { alert('DropDown Value '+$("#ddlSample").val()); alert('DropDown Text '+$("#ddlSample").find('option').filter(':selected').text()); }); }); As you suggested the Option 2...!! IS this possible to use the permission in it..!! Do you think using Custom Library(VS2010) it's will be easy. Needed your Suggestion ..?? Thanks In Advance
    – Kishan
    Commented Apr 7, 2012 at 1:16
  • You can remove the option with $("#ddlSample").find('option').filter(':selected').remove();. Regarding server side code, then by default it'll obey the permissions. I don't think server side code will be easy, your requirements isn't something that's easy with SharePoint in any way. Commented Apr 7, 2012 at 18:43
  • Thanks alot for your help...!! @Per I tried alot by using the jquery options but it was not successful. The Maks Options looks fine . Hopefully it will works for me..!!
    – Kishan
    Commented Apr 10, 2012 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.