cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Have your say in shaping JMP's future by participating in the new JMP Wish List Prioritization Survey
Choose Language Hide Translation Bar
Djtjhin
Level IV

Display box that can both input column name and numeric value

Is there a display box that can take both column name and numeric value ? I'm trying to create a window where users can either select a column from column list (like a col list box) or insert a constant value (like a number edit box).

6 REPLIES 6
txnelson
Super User

Re: Display box that can both input column name and numeric value

No such object exists. However, by using native list box() and text edit box() I can imagine putting some JSL behind them and creating the input window you want. It will just require you to add JSL to replicate the features of the col list box() and add the ability to enter your numeric values too.
Jim
Djtjhin
Level IV

Re: Display box that can both input column name and numeric value

I guess I'm gonna pass on that for now then. Thanks Jim.

Re: Display box that can both input column name and numeric value

Why not provide two choices: a list box populated with column names and a number edit box to accept a number instead? Then define a function or provide an expression to process the one with which the user interacts.

Djtjhin
Level IV

Re: Display box that can both input column name and numeric value

I thought about this idea as well. But I'm expecting a combination of inputs (i.e. both columns & single values). Could you explain more / give examples of the expression function you mentioned ?

David_Burnham
Super User (Alumni)

Re: Display box that can both input column name and numeric value

The way I handle this use-case is to use a ComboBox showing a a pre-defined list of values from which the user can select a value, and the last value of the list is always "other...".  Attach an event handler to the combo box that reacts to a selection;  if the user selects "other..." then I present a modal window with a TextEditBox (or NumberEditBox) where the user can specify a new value.  Afterwards append the new value to the list used to populate the ComboBox.

-Dave
Djtjhin
Level IV

Re: Display box that can both input column name and numeric value

All, thanks for the input and sorry for the late response. I think I manage to find a way around it by adding a radio box for each display box row (e.g. defaulting to input column) which will turn either a col list box or number edit box visible/invisible based on user preference. I haven't tried to write such script but perhaps I'll share it here once I have.