Skip to main content
Nintex Community Menu Bar

How can I determine the number of dropdown choices in a SQL Request control

  • July 24, 2018
  • 4 replies
  • 18 views

Forum|alt.badge.img+1

I have a SQL Request control that returns a set of terms. How can I display a single textbox or calculated control showing the number of returned matching terms.  A custom JavaScript solution is acceptable.

Example:  The control displays:

Select a color...

Red

White

Blue

The textbox should display 3.

4 replies

Forum|alt.badge.img+14
  • Scholar
  • July 25, 2018

I haven't tested it with SQL Request control, but something like following should work for it as well

https://community.nintex.com/message/59955-re-set-field-based-on-valid-checkboxes?commentID=59955#comment-59955 


Forum|alt.badge.img+1
  • Author
  • July 25, 2018

I have successfully used Jquery to count selected checkboxes in the same Nintex form.  But when I tried to do something similar with a dropdown exposed in the SQL Request control, it did not recognize the selectors I tried, which is all the suggestions in this article: https://stackoverflow.com/questions/3337749/how-do-i-check-how-many-options-there-are-in-a-dropdown-menu

I even tried JavaScript (getElementByID) using the actual id attribute with no luck.


Forum|alt.badge.img+14
  • Scholar
  • July 26, 2018

they are general jquery/javascript solutions which may but need not work on nintex controls. you need to understand how single control's DOM is designed by nintex.

have you tried it with sum/length as adviced above?


Forum|alt.badge.img+2
  • October 8, 2018

I am having the same issue with one of my drop down field.

Did you find solution for this issue?