I have a "State" field, with the visualization set for a pick list with all 50 states pre-listed.
I have the field in a VL Web - View as part of a series of data input fields.
The drop down selector works fine, but is there a parm I am missing where if you enter a character the state field input, the list will start or position at the letter in the list values?
Meaning, enter a "M" would start you at Maine (ME).
State field visualization pick list
State field visualization pick list
Arlyn Dale
Servias LLC
Servias LLC
Re: State field visualization pick list
Hi
the example you are looking for, is the one LANSA calls the "Dynamic Auto Complete" available in the web page called xmdmain, view xMdAutocomplete, component MdDropDownAutoComplete, which definition is the next
and take actions for the events of autocomplete
and keypress:
You need to implement all that to get the autocomplete works successfully with a dynamic dropdown.
the example you are looking for, is the one LANSA calls the "Dynamic Auto Complete" available in the web page called xmdmain, view xMdAutocomplete, component MdDropDownAutoComplete, which definition is the next
Code: Select all
Define_Com Class(#PRIM_MD.DropDown) Name(#MdDropDownAutoComplete) Displayposition(3) Left(16) Parent(#PanelDynamic) Tabposition(3) Top(144) Width(768) Promptonly(False) Promptposition(Bottom) Helperposition(None) Appearance(TextFieldBox)
Code: Select all
Evtroutine Handling(#MdDropDownAutoComplete.AutoCompleting) Value(#Value) Handled(#Handled)
#Com_owner.ShowAutoComplete( #Value )
#Handled := True
Endroutine
Code: Select all
Evtroutine Handling(#MdDropDownAutoComplete.KeyPress) Keycode(#Key)
If (#Key = BackSpace)
#MdDropDownAutoComplete.CloseDropDown
Endif
Endroutine-
davidbalansa
- Posts: 92
- Joined: Mon Feb 01, 2016 10:08 am
Re: State field visualization pick list
Hi,
If you want to keep it as a field visualization you would use Dino's code in a Reusable Part defined as a Visual Host. Then create a Visual Host Visualization for your field.
David
If you want to keep it as a field visualization you would use Dino's code in a Reusable Part defined as a Visual Host. Then create a Visual Host Visualization for your field.
David
Re: State field visualization pick list
Thanks for the help and pointing me in the right direction.
All my experience in Lansa has been with WAM's, so moving to the VL Web Pages gets me baffled at times.
All my experience in Lansa has been with WAM's, so moving to the VL Web Pages gets me baffled at times.
Arlyn Dale
Servias LLC
Servias LLC
Re: State field visualization pick list
Thanks again for pointing me in the right direction. Here is what I have worked out and was actually a simple fix.
Once you pointed me to the xMdAutoComplete, I saw a feature / parm that addressed my issue for a Simple auto complete, "Promptonly". I assume the defualt is True, as once I entered this parm to be False, the drop down works like I want. The ability to start typing a letter, and the drop down list values will start to autocomplete, and allow me to use the Up or Down arrow keys to scroll through the list.
In my Field definition, I already had a visualization of "DropdownField", which looks to inherit features of the PRIM_MD.DropDown.
Also in my Field definition, I already had the state names and values loaded into it's *picklist, so I did not need to retrieve or build a list in the pgm.
Once you pointed me to the xMdAutoComplete, I saw a feature / parm that addressed my issue for a Simple auto complete, "Promptonly". I assume the defualt is True, as once I entered this parm to be False, the drop down works like I want. The ability to start typing a letter, and the drop down list values will start to autocomplete, and allow me to use the Up or Down arrow keys to scroll through the list.
In my Field definition, I already had a visualization of "DropdownField", which looks to inherit features of the PRIM_MD.DropDown.
Also in my Field definition, I already had the state names and values loaded into it's *picklist, so I did not need to retrieve or build a list in the pgm.
Arlyn Dale
Servias LLC
Servias LLC