Building a Dictionary

    In this example, we are going to store a complete database table in a framework field scoped as session (__LabelDictionary). The data will be accessed by referencing the dictionary. This technique saves time, particularly database access. A dictionary is a type of array that uses a key rather than a index value.

    The table 'Translation' is retrieved when a user logs in. That is, it is only accessed once per user access. Two fields are retrieved, the EnglishName and Column_Selector. In this example, EnglishName is the primary key.


    To create a dictionary, use a QASSIGN and add the attribute, 'key'. When this QFIND is executed, the dictionary will automatically be created. The scoping of the field icon, __LabelDictionary, as session, will save the dictionary for future use by the user. If you want all users to be able to access the dictionary (as a global value), scope the field as application.

    The column_selector, based on the user's country, defines the output language. The Translation table contains several columns that, using the EnglishName, translate words into several languages.


    Now that we have our dictionary, how do we access it? Simply, by referencing the dictionary icon and key value. In this case, when the key value (EnglishName) is 'Search'. The output will be the word that translates from 'Search' according to the user's language.

    You can either re-create this abacus in all frameworks that require a translation or in one framework where the abacus is acquired. In both cases, the field, __LabelDictionary (scoped as session with framework sharing enabled) must exist.


    /groups/commonground/search/index.rss?tag=hotlist/groups/commonground/search/?tag=hotWhat’s HotHotListHot!?tag=hot0/groups/commonground/sidebar/HotListNo items tagged with hot.hot/groups/commonground/search/index.rss?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomelist/groups/commonground/search/?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomeRecent ChangesRecentChangesListUpdates?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcome0/groups/commonground/sidebar/RecentChangesListmodifiedDateallRecent ChangesRecentChangesListUpdateswiki/welcomeNo recent changes.reverse5search