Field Visualization Q A

Visual LANSA

Field Visualization Q & A
Q. Why is there no EditAppearance called DropDown or Combo?

A. In a list component an EditAppearance of combo box is handled by the existence of a picklist in the fields component source and the column property UsePicklist being set to true. This is why there is no DropDown or ComboBox EditAppearance.

Q. Where is my ComboBox?

A. If you are trying to edit a field as a combo box in a grid and it is not displaying ensure you have taken the following steps.

    Field being edited has a picklist defined in its component source

    Column ReadOnly property is set to FALSE

    Column UsePicklist property is set to TRUE

Q. I have created a picklist with a DefaultVisual(true) for a PRIM_EVPL. This component also has an Appearance(DropDown) property. Why then is my field not a dropdown when used in a column in a grid?

A. The UsePicklist property for your column is set to FALSE. Setting this property to TRUE should make the DropDown available. If not then follow the sample above detailing how to display a dropdown in a grid.

Q. Why does a picklist item text appear in a list when I do an Add_Entry to a list?

A. If a picklist is being used for a field in a list then the value of the field at the time of the Add_Entry and the NoMatchAction property of the picklist control what will be displayed to the user. Refer to the NoMatchAction example for further information.

Q. What is the UsePicklist property?

A. PRIM_EVEF, PRIM_EVSE, PRIM_GDCL, PRIM_LVCL & PRIM_TVCL all contain a property called UsePicklist. This property is a designtime only property. The purpose of this property is to specify whether the picklist of a field, once specifed, is to be used as part of the formatting for the relevant component.

For example: A PRIM_EVSE ( SpinEdit ) has been defined for a numeric field that also includes a Picklist. If the UsePicklist property is FALSE then when visualized the SpinEdit will work as normal through the range of allowable numbers. If UsePicklist=TRUE then the SpinEdit will cycle through the picklist values.

The primary purpose of this property is seen as a way to introduce Field Visualization concepts bit by bit to a large system. Older component can work as they always have with UsePicklist=FALSE whereas new components can have UsePicklist=TRUE to gain access to new functionality.

Q. What is the NoMatchAction property?

A. The NoMatchAction property is a property of PRIM_PKLT and is used by picklist to specify the behavior when a field is set to a value that is not present in the picklist.

Q. What does default value for DisplayAppearance and EditAppearance mean?

A. A value of Default in either the DisplayAppearance or the EditAppearance property signifies that LANSA is to query the current field characteristics and make a 'best guess' of the type of visualization that will be used for the field. This allows the component Editor to immediately provide visual feedback in the List components that support Field Visualization.

For an example take the following steps.

1.  Create a new field (alpha 5)

2.  Open the component source for the Field and add a Visual Picklist (PRIM_EVPL)

3.  Change the Appearance property of the VisualPicklist to CheckBox.

4.  Change the DefaultVisual property of the VisualPicklist to TRUE.

5.  Save the field and use it as a column in a grid.

The above steps show that a value of Default for DisplayAppearance and EditAppearance show items in the list as a check box.

Refer to feature help of these properties for further information on how LANSA interprets the field to find a suitable default.

The value 'Default' for DisplayAppearance and EditAppearance is just that, a Default. It is not possible for LANSA to correctly interpret the field for the desired appearance all the time so if the default value is not satisfactory the value of this property can always be changed.

Q. Why can't I type into my EditBox Visualization?

A. If a field is visualized as an EditBox and you cannot type in the EditBox then the UsePicklist property of the PRIM_EVEF is probably set to TRUE. Switch it to FALSE and you should be able to Edit again.

Q. What is the DefaultVisual property?

A. The DefaultVisual property specifies the default visualization for a field. Whichever visualization is specified as DefaultVisual(TRUE) will be the visualization used when referred to as FieldName.Visual

Q. Why is it so hard?

A. Its not. If it seems to be then take a step backwards. Ensure you are familiar with all relevant terminology. Figure out what you are trying to accomplish first and then find the sample that is the closest match to your requirements.

Q. The field name is VisualEdit but it is referred to as .Visual in the form source. Why?

A. The field can be used on a form as either .VisualEdit or .Visual. This is because the Field is sourced with the DefaultVisual(TRUE) property. Whichever class is defined with DefaultVisual(TRUE) can be referenced by its name or the .Visual identifier. This serves to allow users to change what type of class they want "across the board" by changing the class that has DefaultVisual(TRUE)

Q. How do I pass values from my prompter to the calling field?

A. Define a property for your prompter form and make it the default property of the form. This property will then be used to transfers values from the field to you prompter form and back again.

Q. Why can't I see my prompter?

If a prompter has been specified for a field and the ellipses are not available to make the prompter visible then the ShowPrompter property is probably set to FALSE. Set it to TRUE and the ellipses should be become available so the prompter can be activated.

Q. Are SpinEdit Visualizations only for use with numeric fields?A. No. SpinEdits can be used also for fields that have a picklist defined. In these cases the SpinEdit will cycle through the available items in the picklist.Q. Why is my Check Box appearing as greyed?

A. A field visualized as a Check Box will appear as Greyed when the value of the field is equal to any item between the first and last items in the picklist or a value that is not in the picklist.

Ý 3.6.12 Field Visualization in Depth