Skip Headers
JD Edwards EnterpriseOne Tools Development Tools: Form Design Aid Guide
Release 8.98 Update 4

Part Number E14706-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

20 Understanding Combo Box Controls

This chapter contains the following topics:

20.1 Understanding Combo Box Controls

You can use a combo box (drop-down list) to display a list of items from which the user can make a selection. The combo box includes a type-ahead feature where typing the first character of a matching item description will select that item in the control. It can reside on a form or inside a grid control or in the grid of a parent child control. When inside a grid control, the combo box acts exactly as a normal grid cell except when it has the focus. At that point, it behaves as a combo box; that is, the user can pick an item from the list by clicking and choosing an item from the drop-down, by typing directly in the field, or by using the arrow and enter keys on the keyboard.

You must associate the combo box with a data dictionary (DD) item. If the associated DD item has user-defined code (UDC) values, those values are used to load the combo box list. During runtime, you can load the control with values from a different UDC, if necessary. Alternatively, you can use event rules (ER) in the application to load the values without reference to a UDC, although doing so precludes the ability to directly include translated text in the drop-down list. In either case, using a system function to remove items, you can dynamically filter the list before it is displayed to the user.

No matter what is loaded into the control, upon initialization, the control always displays -- Select One -- as the currently selected item to indicate that the user should select an item in the control. This is true of combo boxes both on a form and in a grid. Although it is an item in its own right, you cannot remove it from the list. --Select One-- always appears at the top of the list; you cannot insert a list item above it.

Note:

-- Select One -- is merely a prompt-an indication to the user to make a selection. --Select One -- is not an actual value. Therefore, it will never be written to the database with the intent of saving it as actual data.

20.2 Loading Combo Box Controls

This section provides an overview of loading combo box controls, and discusses how to:

20.2.1 Loading Combo Box Fundamentals

You can load a combo box control from any of these data sources:

  • Its associated DD UDCs.

  • Cache (using the Load from Cache system function).

  • Any source available to the Add Item system function.

In all cases, runtime checks each item for valid Key and Item parameter pairs. If the Key is null, or its matching description is null or an empty string, runtime throws an error and does not load that item. Also, to avoid duplicate items from appearing in the list, runtime does not load an item if it finds the item's Key parameter value in the combo box's current item list. This check avoids duplicate list items; however, it does not prevent two (or more) different list items with the same name (Description parameter) from appearing in the list.

No matter what method you choose to load the control, ensure that the user has at least one option to select. As part of the initialization process, if runtime cannot find at least one value to put in the drop-down list, it disables the combo box control until one or more values are loaded into the control.

In some cases, the values to load into the combo box might include an item where the Key is " " (single blank) and the description is "(None)." In fact, in JD Edwards EnterpriseOne applications, this value has been used as a blank default value, historically. Although this is a valid item to load into the combo box, it is recommended that you ascribe a meaningful text string to such an item that makes sense in the context of the application as opposed to descriptions such as (None), or " ."

Note:

As of release 8.94, the practice of the runtime engine automatically loading a combo box that is configured in Form Design Aid (FDA) as being not required with a default combo box item of key = " " (single blank) and description = "(None)" is discontinued. If such an item must be loaded in the context of the application in question, that task is now the responsibility of the application developer to define and insert into the control.

20.2.2 Loading a Combo Box from a UDC

The combo box control supports string and numeric data types for the combo box's keys and the matching descriptions are always treated as strings. Dynamic changes to a combo box based on a UDC can be made with the system functions Set Data Dictionary Item or Set Data Dictionary Overrides to load a new set of key (value)/description pairs.

If the application must support multiple languages, loading from a UDC is probably an ideal choice because of the way JD Edwards EnterpriseOne applies alternate UDC lists automatically based on the user's language code. An alternative to dynamically changing the values displayed in a combo box at runtime is to use the Set Data Dictionary Item or Set Data Dictionary Overrides system functions to load the correct set of values as needed. You can suppress inappropriate list items within an existing combo box item list using the Remove Item system function. If you must set up the combo box based on a non-UDC DD item but translated descriptions still need to be displayed to the user, you have some options.

You can use the ER system value, SL LanguagePreference, to acquire user's language preference. Use that value to fetch and load items into the combo box manually from the appropriate UDC table (F0005 standard UDC table, or F0005D translated UDC table).

Alternatively, you can define the necessary description items as text variables in the application and then use these text variables in conjunction with the Add Item system function to add the items to the combo box.

Runtime always loads from the UDC if one is associated with the combo box's data dictionary item. If the combo box is loaded from a UDC and you want to load from a non-UDC source instead, use Set Data Dictionary Item to associated a data dictionary item that does not have a UDC with the combo box. Then you can load from cache or use Add Item instead.

20.2.3 Loading a Combo Box from Cache

The Load From Cache system function enables you to load a combo box from a JD Edwards EnterpriseOne cache data source. Runtime will load values from cache only if the target combo box control is based on a valid DD item that does not have a UDC list associated with it.

When working from cache, you must have a prepared data structure to govern loading data from source into the cache and then transferring it from the cache to the combo box control. When you choose (or create) a data structure to use for this purpose, ensure that the Key, Item, and optional Filter Column parameter data types are compatible with the corresponding data types demanded by the system functions you will call.

Note:

All of the values are retrieved from cache prior to filtering. Therefore, you should avoid loading large quantities of data into cache to reduce the possibility of poor performance.

The JD Edwards EnterpriseOne cache from which the combo box item data will be read must have defined a distinct column containing one or more rows of data for each of these combo box data items:

  • E1 Cache Column - Keys (values)

  • E1 Cache Column - Items (descriptions)

  • E1 Cache Column - Filter Column Values (optional filter value)

If the optional filter cache column is not designated or does not contain valid data, runtime will retrieve and load into the combo box all of the key/description pairs currently loaded in the specified cache. After the combo box has been loaded from the cache, you can dynamically remove items from its item list using the Remove Item system function.

20.2.4 Loading a Combo Box with the Add Item System Function

To load a small number of items into a combo box, you can use the Add Item system function. If translated description text is needed, you can use text variables for the item descriptions or fetch the data manually from the appropriate UDC table (F0005, or F0005D) based on the user's language preference that is accessible through the system value, SL LanguagePreference.

20.3 Combo Box Control Design-Time Considerations

The combo box control has no unique property settings. Among the more standard property settings, the Required Field flag deserves mention in relationship to the combo box control. Recall that when initialized, the control simply displays the user prompt, -- Select One --. If the Required Field flag is enabled and this prompt is displayed during validation, the engine throws an error and prevents the user from continuing until he or she selects an item from the list. On the other hand, if the flag is disabled under the same circumstance, the engine will actually write a blank (that is, key = ) to the database if the -- Select One -- prompt is still selected at the time the OK or Save button is clicked. The blank is written to the database in this case because the system cannot save an empty string () as a value for a key.

A second consideration when using the Required Field flag with combo boxes is that, if the required field indicator should be displayed in the application, you must check the Required Field property for the combo box and then connect static text to it. Be sure to size the connected static text box appropriately to allow for the "required" indicator to be appended to the end of the text, and also to allow for translations. If you do not connect static text to the combo box, runtime does not display the required field indicator in the application.

To connect static text to the combo box, select the combo box and the label. Then select Edit, Reconnect. To disconnect the static text from the combo box, select them and then select Edit, Disconnect.

20.4 Combo Box Control Events

These events can fire on the combo box control during runtime:

Runtime fires the Selection Changed event when the user or application selects an item in the combo box list that is different from the item currently selected. In Microsoft Internet Explorer (IE), this selection can be made using any of these methods:

In some explorers other than IE (such as Mozilla), the user might need to tab out of the combo box to trigger the Selection Changed event, particularly if the selection was made using the keyboard.

Of course, runtime fires Control is Entered when the user changes the focus to the check box by any of these means, and fires Control is Exited when the control loses focus.

20.5 Combo Box Control Runtime Processing

This section discusses how the runtime engine processes the combo box.

20.5.1 Control Initialization

When runtime loads the control, items with a blank key are valid, but display no description if the description parameter is also blank. If the item has a key which is a string of one or more continuous blank characters, runtime concatenates the multiple blank characters to a single blank character. Similarly, the engine removes blank characters that follow an otherwise non-blank item key value before inserting it into the control.

Note:

The previous behavior of the HTML runtime engine automatically loading a combo box item having:

key = "" (an empty string) or " " (blank) (depending on SP level)

and

item description = (None)

when the control is marked in FDA as being not required is discontinued as of JD Edwards EnterpriseOne 8.94.

Additionally, to be functional, a combo box must have a valid DD item associated with it. Combo boxes that do not have such an associated item are rendered displaying the text string, "Uninitialized," and are automatically disabled.

If you set a combo box as a string data type (such as string or character), when runtime initializes the control and loads the -- Select One -- prompt into the combo box, the prompt's internal key value is "" (an empty string). If you set a combo box as a numeric data type (such as Integer, ID, or Math Numeric), when runtime initializes the control and loads the -- Select One -- prompt into the combo box, the prompt's internal key value is -999999999. It is therefore important, when you are building your application ERs, to allow for the case when the user leaves the control set selected on the default prompt item and the key value is sent from the control.

The control initialization process is illustrated in this flowchart:

Figure 20-1 Combo box control initialization process

Description of Figure 20-1 follows
Description of "Figure 20-1 Combo box control initialization process"

Generally two cases exist where runtime might show an item description other than the -- Select One -- prompt as the currently selected item in a combo box when a form appears initially:

  • When a given combo box's associated DD item has a default value defined and you come into the form in Add mode, runtime attempts to match the default value to the keys of the items currently loaded in the combo box and sets that item as the selected item.

  • Dependent on form type, regardless of whether the form was started using form interconnect, the current form mode (Add/Copy/Update), and whether the control is mapped to a business view column (Key or otherwise), runtime might have retrieved a key value also and will try to set this as the current selected item in the combo box.

If you want to load the combo box from cache or using the Add Item system function, the event most typically used for such loads is Post Dialog Initialized.

20.5.2 Control Validation

Runtime performs the validation process illustrated in this flowchart when the control is validated:

Figure 20-2 Combo box control validation process

Description of Figure 20-2 follows
Description of "Figure 20-2 Combo box control validation process"

20.5.3 Load from Cache

This flowchart illustrates how runtime loads the combo box from cache when the Load from Cache system function is processed. If an error occurs at any point during the processing, any data that might have been loaded into the combo box is cleared and the control is disabled:

Figure 20-3 Combo box control load from cache process

Description of Figure 20-3 follows
Description of "Figure 20-3 Combo box control load from cache process"

20.5.4 Database Commit

When an application signals a database commit, runtime writes the key value (instead of the displayed description) of the currently-selected combo box item to the database. If the field is flagged as not required and the currently-selected value is -- Select One --, runtime saves a string of continuous blank characters matching the size of the associated table column. The system cannot save the actual matching empty string ("") key value associated with the -- Select One -- prompt to the database, which is why it saves a string of blank characters instead.

20.5.5 System Functions

When you call Set Data Dictionary Item, Set Data Dictionary Override, or Load From Cache, runtime clears the control of its current items prior to loading any new data specified by the system function call. This is not only true of combo boxes on a form, but in a grid as well. If the new data dictionary item associated with the system function call or associated UDC override results in a change from the current DD Item and/or UDC specified for the grid control, then runtime removes all list items from all embedded combo box controls for all current rows of the column, except for the default -- Select One -- prompt. If this action results in a new set of UDC values, then runtime loads those values into every current embedded combo box control for all of the rows in the grid or Parent Child control.

20.5.6 Import into Grid

HTML users can import data into a grid containing embedded combo boxes just as they can into a grid without the JD Edwards EnterpriseOne grid import/export feature. When a user does so, the value being imported into the embedded combo box must be the Key parameter value that corresponds to a valid combo box key/item (description) pair.

If the target cell resides in a grid column that has a data dictionary item with an associated UDC, then runtime creates an embedded combo box in the target cell and loads the UDC-defined key/item pairs into it. Next, runtime attempts to match the imported key to one of the currently loaded keys. If it finds a match, runtime sets it as the currently-selected item in the cell. Otherwise, it ignores the item and sets the cell to the -- Select One -- value.

If the target cell resides in a grid column that does not have a data dictionary item with an associated UDC, then runtime creates an embedded combo box with one item set as selected having a Key parameter of (blank) and an Item (description) parameter of Uninitialized. Then runtime disables the cell.

20.6 Combo Box Control System Functions

This chapter discusses the system functions unique to the combo box control when it resides on a form (that is, it is not embedded in a grid.


Add Item

Use this system function to add an item to the combo box if it is not displaying a list that is based on a UDC.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Key

Input, required. The key of the item to add (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Item

Input, required. The name of the item to add (string). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Index

Input, optional. The zero-based index position where the item is to be added (integer). If you do not specify this parameter, runtime appends the item to the bottom of the list. The default -- Select One -- prompt always occupies index position zero. If an invalid index is specified, the addition of the new item fails and an error message is logged. Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Additional Notes

Use this system function to add an item to the combo box. Runtime verifies that the Key and Item parameter values are both specified. If either is missing, the addition of the new item fails and an error is logged. If you try to insert an item having a key value that already exists in the list, runtime will not add the item and will log an error. The combo box control must reside on the form (as opposed to being embedded in a grid). The control must have a valid data dictionary item associated with it.

If the key value of the key/description pair specified in the Add Item system function call to be added to the control corresponds to a valid key value in the associated UDC set and that key value is currently not loaded in the control (in other words, it was removed after the control was initialized), the runtime engine allows the item to be added back into the control. Runtime recognizes the fact that it currently does not exist in the control's item list and that it is a valid key value in the UDC's set. Otherwise, the attempt to add the new item will fail.


Get Description

Use this system function to get the displayed description of the current selected item of a specified combo box.

Parameters

ComboBox

Input, required. The combo box FC to affect.

Item

Input, required. The object to which to assign the return value that designates the description text of the current selected item (string). Set the parameter to an applicable object from the object list.

Returns

This system function returns the name of a combo box item to the object identified by Item.


Get Index of Key

Use this system function to get the zero-based index position of an item in a combo box list by specifying its key. If the key value specified does not exist in the combo box's current set of items, no index value is returned and an error message is logged.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Key

Input, required. The key of the target item (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Index

Input, required. The object to which to assign the return value that designates the zero-based index position of the target item (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Returns

This system function returns the zero-based index position of a combo box item to the object identified by Index.


Get Item at Index

Use this system function to get the displayed description of an item in a combo box list by specifying its index position in the list. If the index value specified is invalid, no description is returned and an error message is logged.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Index

Input, required. The zero-based index position of the target item (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Item Description

Input, required. The object to which to assign the return value that designates the displayed description text of the target item (string). Set the parameter to an applicable object from the object list.

Returns

This system function returns the name of a combo box item to the object defined by Item Description.


Get Item Count

Use this system function to determine the total number of items in the combo box list including the -- Select One -- prompt.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Number

Input, required. The object to which to assign the return value that designates the number of list items. Set the parameter to an applicable object from the object list.

Returns

This system function returns the number of items in the combo box list to the object identified by Number.


Get Key at Index

Use this system function to get the key of an item in a combo box list by specifying its index position in the list. If the specified index value is invalid, no key value is returned and an error message is logged.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Index

Input, required. The zero-based index position of the target item (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Key

Input, required. The object to which to assign the return value that designates the key of the target item (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Returns

This system function returns the key of a combo box item to the object defined by Key.


Load from Cache

Use this system function to load the combo box control from a JD Edwards EnterpriseOne cache. The control must be based on a DD item which does not have an associated UDC defined for it.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Cache Name

Input, required. The name of the prepopulated JD Edwards EnterpriseOne cache from which to load combo box items (string). Set the parameter to an applicable object from the object list.

Data Structure

Input, required. The name of the predefined JD Edwards EnterpriseOne data structure to use to load the combo box items from cache (string). This must be the same data structure as the one used to initialize and load the cache. Set the parameter to an applicable object from the object list.

Key Column

Input, required. The cache column containing the key values for the items to be loaded into the combo box (type defined by data structure). Set the parameter to an applicable object from the object list (the list is empty until you select a data structure).

Item Description Column

Input, required. The cache column containing the text descriptions for the items to be loaded into the combo box (type defined by data structure). Set the parameter to an applicable object from the object list (the list is empty until you select a data structure).

Filter Column

Input, optional. The cache column containing the values against which to filter items to be loaded into the combo box (type defined by data structure). The data type must match that of the Key Column parameter. Set the parameter to an applicable object from the object list (the list is empty until you select a data structure).

Filter Value

Input, optional. A value used by runtime to compare against values specified in the Filter Column parameter (string or numeric). The data type must match that of the Filter Column parameter itself. After it retrieves all of the cache records, runtime loads a key/description pair into the combo box only if its Filter Value matches the Filter Column value for that record. Otherwise the retrieved record is ignored and runtime proceeds to process the next retrieved record. Set the parameter to <N/A> or an applicable object from the object list.

Additional Notes

The Load From Cache mechanism always retrieves all of the records currently loaded in the cache from the enterprise server to the Web server when the call is made regardless of whether the optional Filter Column and Filter Value parameters are specified. If you include several combo boxes on a form, you might decide to create a single data structure that loads the cache for all of them. However, you must use discretion in balancing how many records are loaded simultaneously in the cache versus the performance penalties that might result when loading a single combo box with a relatively small subset of the cache.


Remove Item by Index

Use this system function to remove an item from a combo box list by specifying its index position.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Index

Input, required. The zero-based index position of the item to remove (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Optional

Input, required. A special value indicating whether to remove all items. Set the parameter to <Remove All> or <N/A>.

Additional Notes

You can also clear all items from the list. If the index value specified is invalid and the Optional parameter equals <N/A>, no item is removed from the control and an error message is logged.


Remove Item by Key

Use this system function to remove an item from a combo box list by specifying the item's key.

Parameters

ComboBox Control

Input, required. The combo box FC to affect.

Key

Input, required. The key of the item to remove (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Optional

Input, required. A flag indicating whether to remove all items. Set the parameter to <Remove All> or <N/A>.

Additional Notes

You can also clear all items from the list. If the key value specified is invalid and the Optional parameter equals <N/A>, no item is removed from the control and an error message is logged.


Select Item

Use this system function to set one of the items in the combo box as the currently selected item programmatically. The item's description appears in the control just as if the user had chosen it.

Parameter

ComboBox Control

Input, required. The combo box FC to affect.

Key

Input, required. The key of the item to set (string or numeric). Set the parameter to an alphanumeric constant (<Literal>), <Null>, or an applicable object from the object list.

Additional Notes

If the key value specified is invalid, the combo box's selection remains unchanged.


Embedded Combo Box System Functions

This section discusses the system functions unique to the combo box control when it is embedded in a grid.


Add Item

Use this system function to add an item to the combo box list embedded in a grid that is not displaying a list based on a UDC.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Key

Input, required. The key of the item to add (string or numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Item

Input, required. The name of the item to add (string). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Index

Input, optional. The zero-based index position where the item is to added (integer). If you do not specify this parameter, runtime appends the item to the bottom of the list. The default -- Select One -- prompt always occupies index position zero. If an invalid index is specified, the addition of the new item fails and an error message is logged. Set the parameter to an alphanumeric constant (<Literal>), <Null>, or an applicable object from the object list.

Additional Notes

Use this system function to add an item to the combo box if it is not displaying a list that is based on a UDC (however, the control itself must be based on a valid DD item). Runtime verifies that the Key and Item parameter values are both specified. If either is missing, the addition of the new item fails and an error is logged. If you try to insert an item having a key value that already exists in the list, runtime will not add the item and will log an error.


Get Description

Use this system function to get the name of an item in a combo box list by specifying its row number.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Item

Input, required. The object to which to assign the return value that designates the description text of the current selected item (string). Set the parameter to an applicable object from the object list.

Returns

This system function returns the name of a combo box item to the object identified by Item.


Get Index of Key

Use this system function to get the zero-based index position of an item in a combo box list by specifying its key. If the key value specified does not exist in the combo box's current set of items, no index value is returned and an error message is logged.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Key

Input, required. The key of the target item (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Index

Input, required. The object to which to assign the return value that designates the zero-based index position of the target item (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Returns

This system function returns the zero-based index position of a combo box item to the object identified by Index.


Get Item at Index

Use this system function to get the displayed description of an item in a combo box list by specifying its index position in the list. If the index value specified is invalid, no description is returned and an error message is logged.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Index

Input, required. The zero-based index position of the target item (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Item Description

Input, required. The object to which to assign the return value that designates the displayed description text of the target item (string). Set the parameter to an applicable object from the object list.

Returns

This system function returns the name of a combo box item to the object defined by Item Description.


Get Item Count

Use this system function to determine the total number of items in the combo box list including the -- Select One -- prompt.

Paremeters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Number

Input, required. The object to which to assign the return value that designates the number of list items. Set the parameter to an applicable object from the object list.

Returns

This system function returns the number of items in the combo box list to the object identified by Number.


Get Key at Index

Use this system function to get the key of an item in a combo box list by specifying its index position in the list. If the specified index value is invalid, no key value is returned and an error message is logged.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Index

Input, required. The zero-based index position of the target item (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Key

Input, required. The object to which to assign the return value that designates the key of the target item (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Returns

This system function returns the key of a combo box item to the object defined by Key.


Load from Cache

Use this system function to load the combo box control from a JD Edwards EnterpriseOne cache. The control must be based on a DD item which does not have an associated UDC defined for it.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Cache Name

Input, required. The name of the prepopulated JD Edwards EnterpriseOne cache from which to load combo box items (string). Set the parameter to an applicable object from the object list.

Data Structure

Input, required. The name of the predefined JD Edwards EnterpriseOne data structure to use to load the combo box items from cache (string). This must be the same data structure as the one used to initialize and load the cache. Set the parameter to an applicable object from the object list.

Key Column

Input, required. The cache column containing the key values for the items to be loaded into the combo box (type defined by data structure). Set the parameter to an applicable object from the object list (the list is empty until you select a data structure).

Item Description Column

Input, required. The cache column containing the text descriptions for the items to be loaded into the combo box (type defined by data structure). Set the parameter to an applicable object from the object list (the list is empty until you select a data structure).

Filter Column

Input, optional. The cache column containing the values against which to filter items to be loaded into the combo box (type defined by data structure). The data type must match that of the Key Column parameter. Set the parameter to an applicable object from the object list (the list is empty until you select a data structure).

Filter Value

Input, optional. A value used by runtime to compare against values specified in the Filter Column parameter (string or numeric). The data type must match that of the Filter Column parameter itself. After it retrieves all of the cache records, runtime loads a key/description pair into the combo box only if its Filter Value matches the Filter Column value for that record. Otherwise the retrieved record is ignored and runtime proceeds to process the next retrieved record. Set the parameter to <N/A> or an applicable object from the object list.

Additional Notes

The Load From Cache mechanism always retrieves all of the records currently loaded in the cache from the enterprise server to the Web server when the call is made regardless of whether the optional Filter Column and Filter Value parameters are specified. If you include several combo boxes on a form, you might decide to create a single data structure that loads the cache for all of them. However, you must use discretion in balancing how many records are loaded simultaneously in the cache versus the performance penalties that might result when loading a single combo box with a relatively small subset of the cache.


Remove Item by Index

Use this system function to remove an item from a combo box list by specifying its index position.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Index

Input, required. The zero-based index position of the item to remove (integer). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Optional

Input, required. A special value indicating whether to remove all items. Set the parameter to <Remove All> or <N/A>.

Additional Notes

You can also clear all items from the list. If the index value specified is invalid and the Optional parameter equals <N/A>, no item is removed from the control and an error message is logged.


Remove Item by Key

Use this system function to remove an item from a combo box list by specifying the item's key.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Key

Input, required. The key of the item to remove (string or math-numeric). Set the parameter to an alphanumeric constant (<Literal>) or applicable object from the object list.

Optional

Input, required. A flag indicating whether to remove all items. Set the parameter to <Remove All> or <N/A>.

Additional Notes

You can also clear all items from the list. If the key value specified is invalid and the Optional parameter equals <N/A>, no item is removed from the control and an error message is logged.


Select Item

Use this system function to set one of the items in the combo box as the currently selected item programmatically. The item's description appears in the control just as if the user had chosen it.

Parameters

Grid Control

Input, required. The grid FC to affect.

Grid Column

Input, required. The grid column to affect. Set the parameter to an applicable object from the object list.

Grid Row

Input, required. The grid row to affect (integer). Set the parameter to an alphanumeric constant (<Literal>), <Currently Selected Row>, or an applicable object from the object list.

Key

Input, required. The key of the item to set (string or numeric). Set the parameter to an alphanumeric constant (<Literal>), <Null>, or an applicable object from the object list.

Additional Notes

If the key value specified is invalid, the combo box's selection remains unchanged.