This project has moved. For the latest updates, please go here.

Lookup field - hide options

Jul 30, 2015 at 9:40 AM

I read through your documentation and this looks awesome! Kudo's on your work!

I am currently developing a sharepoint site where users can make reservations on calendars for different devices. These devices sometimes have accessories that need to be booked. I added a lookup column to my calendar, that retrieves a list of accessories. However, it is currently no OOTB possible to filter the items in this lookup column.
I would like to restrict the 'visible'/'available' items in my lookup field on the form to accessories from the accessories list that have a certain property (i.e. the name of the instrument in question should be present as metadata for the accessory item).

I hope this explanation is somewhat clear ;-) Is this possible with your multi-select lookup code? So either I want to hide certain items (by automatic selection) from the lookup field, or delete them from the field. This way I can reuse the code/form instead of repeating the process for about 30 instruments :p

Aug 3, 2015 at 11:36 PM
Thanks for the kudos!

Your use case makes sense to me. You can probably do this all client side and I think you have two main options.

1) Try to use lookup fields and modify the lookup field to add/remove values.
2) Use a text field and transform it into a checkbox/multi-select field

I think with either option you're going to be doing a fair amount of JavaScript coding.

Personally I would lean towards Option #2 because the lookup fields make everything complicated and text fields are simple to code around. Good luck!