Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am creating a library kinda application in SharePoint2010 and i am truck up with a scenario.

I have a List A,where the book names and their details are updated with the availability(Total no. Of books available).

For the users requesting for books from library,i have created another List B and the book title from List A is added as a lookup field in List B.

Now, for instance there are only 2 books titled “Book1”. If both the books have been taken by 2 different users, when a 3rd user who requests for the same book(Book1) should not be able to make the request through List B.May be a error message shall be displayed.

If any other approach would work for my requirement, that would also help.

The main requirement is that if the available stock of books are already over/taken, the next user should not be able to make the request.

share|improve this question
    
Thanks for your quick response. From your article,i am able to understand that if the availability of the book is made as Yes/No,it would be achieved easily. In my List A,i will be specifying the total number of books that are available(for example: 2) In List B,already 2 users would have requested for the book and would have taken it. This means,that book is not available in the library now.In this scenario,how do i check the availability using the book count from List B? –  George Jan 31 '13 at 10:28
    
You will need to do some level of custom coding e.g. event handler/Workflows. For example, in the List A, you can have the TotalBookCount, BooksIssued and Availability fields. In the ListB, you can create ItemAdding/ItemAdded event handler, when the user applies for a book, you will update the Availabilty, and BooksIssued fields. –  Nadeem Yousuf Jan 31 '13 at 10:43
    
Thanks Nadeem. That helps :) –  George Jan 31 '13 at 10:57
add comment

1 Answer

Here is a suggestion: The list of available books in List A is going to increase with the passage of time. That would mean the Lookup to the List A from List B is going to increase and the UI will not look pleasing at all. Now to overcome this issue as well as to take care of the availability issue, you can use one of my free controls (SharePoint 2010 Autocomplete lookup Field). As the name suggests the lookup value is populated as you type. For the availability issue, you can create a check box field which will either be true or false. If you go through the documentation of this control, you will see, you can set an additional REST Filter in the field properties. Here you can specify that you don't want to show those books in the lookup which are not available. Please, feel free to ask if you need any help.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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