From 08:00 PM CDT Friday, August 12 - 01:00 PM CDT Saturday, August 13, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Dropdown list from max and min value

Hi,

I want to create a dropdown menu of natural numbers; I want to input maximum and minimum value and it should show me the list of all natural numbers between these two numbers. My idea was to create an array with for loop and connect it with drop down list. But it seems like my MATLAB logic is useless here and couldn't figure out how even create an array. Any suggestion? Thanks.

Message 1 of 9
(320 Views)

## Re: Dropdown list from max and min value

So you have three controls:

Two integer controls to enter lower and upper limit

A ring that will fill with items containing all integers in-between. (within reason, you don't want a million entries!). The terms "between" is a bit fuzzy, but I assume you also want to include the limits in the ring.

Should be trivial. Code will fit on a postage stamp. What have you tried?

Message 2 of 9
(304 Views)
Solution
Accepted by mub.re

## Re: Dropdown list from max and min value

Try this:

Don't forget the learning resources listed at the top of the forum.

Message 3 of 9
(299 Views)

## Re: Dropdown list from max and min value

Thanks! I was trying with for loop and array to connect with combo-box

Message 4 of 9
(274 Views)

## Re: Dropdown list from max and min value

@mub.re wrote:

I was trying with for loop and array to connect with combo-box

That sentence has absolutely no information content. 😄

Message 5 of 9
(259 Views)

Message 6 of 9
(253 Views)

## Re: Dropdown list from max and min value

Hi,

one more question. How can I get the selected number? When I try to extract, it gives me only values(0,1,2..).

Message 7 of 9
(231 Views)
Solution
Accepted by mub.re

## Re: Dropdown list from max and min value

@mub.re wrote:

Hi,

one more question. How can I get the selected number? When I try to extract, it gives me only values(0,1,2..).

You can us the value to index into the blue array to get the number or you could write the strings&values property instead.

Here are two possibilities:

Message 8 of 9
(223 Views)

## Re: Dropdown list from max and min value

You are a lifesaver, thanks!

Message 9 of 9
(210 Views)