Hi,
I have two requests from a customer related to query builder and filter option on listbox:
1. can we have the ability to select ONLY ONE row in the listbox ? it is a basic option in the listbox when you script it but I can not see anything in the query builder interface.
2. When you have a listbox with 10 elements, and you prompt it would it be possible to allow the user to choose only one subset of this 10 elements? for example only 4? So in the query builder environment, you select your 4 rows and when you run the query, you can choose only in this 4 and not see the additionnal 6.
Thank a lot for your suggestions if it is possible with actual release (or JMP 15?)!
Florence
Hi @flo_kussener,
1. I do not believe there is a way to restrict selection in a prompt to a single item the way you can with a standard list box (i.e. there isn't a corresponding 'max selected' functionality in the prompt settings). At best you can modify the listbox in the query window using Show Properties to set the Max Selected argument. But, that change won't have any effect on the listbox jmp generates for the prompt. This is a good suggestion that the customer could submit to the Wish List.

2. You can accomplish this by using two filters, one to define the subset of levels with which to prompt the user, and another (marked as conditional under the red triangle for the filter), that is used to prompt the user (and only that one should be marked to prompt). Here's an example of what that would look like:

And here is the jsl for that example:
New SQL Query(
Version( 142 ),
Connection( "JMP" ),
JMP Tables(
["Big Class" =>
"/Library/Application Support/JMP/14/Samples/Data/Big Class.jmp"]
),
QueryName( "SQLQuery1" ),
Select(
Column( "name", "t1" ),
Column(
"age",
"t1",
Analysis Type( "Ordinal" ),
Numeric Format( "Fixed Dec", "0", "NO", "" )
),
Column( "sex", "t1" ),
Column( "height", "t1", Numeric Format( "Fixed Dec", "0", "NO", "" ) ),
Column( "weight", "t1", Numeric Format( "Fixed Dec", "0", "NO", "" ) )
),
From( Table( "Big Class", Alias( "t1" ) ) ),
Where(
In List(
Column(
"age",
"t1",
Analysis Type( "Ordinal" ),
Numeric Format( "Fixed Dec", "0", "NO", "" )
),
{12, 13, 14, 15},
UI( SelectListFilter( ListBox, Base( "Categorical" ) ) )
) & In List(
Column(
"age",
"t1",
Analysis Type( "Ordinal" ),
Numeric Format( "Fixed Dec", "0", "NO", "" )
),
_AllRows_,
UI(
SelectListFilter(
ListBox,
Base(
"Categorical",
Conditional,
Prompt(
"age:",
Character,
PromptName( "t1.age_1" ),
ValueSource(
Column(
"age",
Alias( "age" ),
Table( "Big Class" )
)
)
)
)
)
)
)
)
) << Modify;
I hope this helps a bit!
@julian