Jump to content

Bulk Edit Cascading Drop Down Remove Blanks


Recommended Posts

Good Morning, 

I'm using a bulk edit on a tabular search and report. I've noticed that my Cascading drop-downs in the bulk edit  show blank entries when there in no data for the filed being edited in it's own table.

I have a view set-up to filter out blank entries in the table being used for value purposes;  however unless the field has data in its own table it still shows a blank. 

I found the following code for standard drop downs but haven't found any information for cascading drop downs used in the bulk edit. Hoping someone can assist with code updates. All my attempts have been unsuccessful. Thanks...Bre

<SCRIPT LANGUAGE="JavaScript"> 

<!-- Function removeBlanksInDropdown searches for blank entries and removes all occurrences. It is advisable to use this script with the "Show distinct display options" checkbox checked in the dropdown configuration in the Caspio Bridge DataPage Wizard --> 
function removeBlanksInDropdown()
{ 
   /* dropdown stores the value of the dropdown form element reference in the DataPage. */
   var dropdown = document.getElementsByName("Value1_1");

   for (var q = dropdown[0].length-1; q >= 0; q--)
   { 
      if (dropdown[0].options[q].value == "")
         dropdown[0].remove(q);
   }
 }

document.addEventListener('DataPageReady', removeBlanksInDropdown);
</SCRIPT>

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...