Hide "Add New" vLookup button based on query results

Forums vLooup for SharePoint Hide "Add New" vLookup button based on query results

This topic contains 2 replies, has 2 voices, and was last updated by  Chris Diltz 8 months, 2 weeks ago.

  • Author
  • #18030

    Chris Diltz

    Does anyone know of a way to hide the “add new item” button in vLookup based on the query results? My use case: If an item already exists matching the query, disable the button so that another item is not added, limiting the user to one entry per query.

  • #18120

    Alexander Bautz

    There is no built in function you can use, but maybe you can use something like this:

    var vLookupHideNewItemBtnTicker = setInterval(function(){
    	if(spjs.vLookup.dataObj.vLookupTasks !== undefined){
            if(spjs.vLookup.dataObj.vLookupTasks[spjs.dffs.data.thisItemID].count > 0){

    Change “vLookupTasks” to match your field name.


You must be logged in to reply to this topic.