Smart Suggestions and Filtering

Smart suggestions are a Uniface feature that enable search and filtering functionality on the basis of object name and description. This makes it easier and faster to find an object that you want to open, edit, or use in a given context.

For example:

  • In the Main U-Bar, you can use suggestions to construct the URL of a development object to open for editing.
  • In the U-Bar of the Resource Browser, you can quickly find the modeled entity you want to insert in the component structure (in the Component Editor), or add to a relationship (in the Entity Editor).
  • In the Properties Inspector and Structure pane, suggestions are offered when you start to rename a component entity, field, or label.
  • In the Snippets pane of the Resource Browser, you can find a the snippet you want to insert based on its alternative name and description. For example, for the default snippets in the Component and Entity editors. you can filter snippets intended for a target object (cpt, occ, or fld) or module type (trigger, webtrigger, or operation), as well finding a module name (accept, exec, quit and so on) or snippet description.
  • In the Templates tab of all editors, you can filter templates based on their alternative name and description.
  • In the Fields tab of the Define Keys/Indexes worksheet of the Entity Editor, you can filter the listed fields based on their name and description.

As you type a keyword or part of an object name, the Uniface IDE provides a list of suggestions for objects that match the provided string and are appropriate to the context.

Using Suggestions

To get suggestions for most objects:

  • Click in the U-Bar or property field to put it into edit mode, then start to type.

    In the Main U-Bar you need to start with the abbreviation for the type of object, such as cpt: or ent:; in other fields, the default object type is automatically supplied.

  • As you type, suggestions are displayed with characters that match the search string highlighted in bold.

    If suggestions are displayed in a drop-down list, the first exact match (if there is one) is also automatically added to your entered text (known as auto-completion).

  • To choose a different suggestion, you can use the Up and Down arrows, the Page Up and Page Down keys, and the scroll bars.
  • To browse down to child objects, choose a suggestion, and add a slash(/) to see sub-objects.

    Note: In the Main U-Bar, object code suggestions for lbl:, lin:, are:, and prop: are provided to help you construct a valid URL. Once you have chosen one of these codes, no further suggestions are offered for object or property names.

  • To accept a suggestion, you can double-click it in the list, or highlight it and press Enter or Tab.
  • In the Resource Browser, the suggestions are shown in the tab itself.

  • In the Snippets tab of the Write Script worksheet, suggestions are based on the alternative name and description. This makes it easier to find snippets intended for a specific object (by entering cpt, occ, or fld), or a specific type of module (such as trigger, webtrigger, or operation), as well as finding snippets based on the target module name or snippet description.

    For more information, see Find and Insert Snippets.

Wildcards

You can use wildcard characters * and ? and Uniface profile characters (Gold-*, Gold-?) to search for a pattern. For example, ab??form* or *browse.

Note: When using wildcards, characters that match the search string are not highlighted.

In the Snippets tab, spaces are treated as wild cards, so there is no need to use other wild cards (although they are supported). For example, to find snippets for field-level error triggers, you could enter err fld or fld err.

Results

By default the maximum number of suggestions offered is 50 but you can change this using the UBAR_RESULTS_MAXHITS in the ide.asn file.

In most cases, the most relevant suggestions are listed first, depending on the context. As you start to type, the suggested objects are usually offered in the following order:

  1. Objects with a name that starts with what you typed, ordered by last modified.
  2. Objects with a name that contains what you typed, ordered by last modified.
  3. Objects with a description that contains what you typed, ordered by last modified.

If you have entered only the object type (for example, prj: or cpt:), the most recently modified objects of that type are listed first. Entities are not sorted by modification date because this enables both supertype and subtype entities to be included in suggestions.

Related Topics