Tags

    Dynamic Formatting

    Some projects require specialized formatting dependent upon user parameters. In this example, the format of a date is changed based on the country of the user. A user table has been set up, so when a user logs in, his/her country is retrieved and stored as a session field. This value is then used to change how a date is displayed.

    A framework icon is created that has framework sharing enabled (out_date). This icon will carry the date value, from the database (ESP/Invoice/invoice_due_date) to the Globals framework and display the output via QINCLUDE.







    In the Globals framework, a corresponding icon (out_date) is created, also with framework sharing enabled.

    dateformat.tiff





    Based on the user's country, the proper format is determined for out_date.

    global.tiff











    The web template that is 'included' returns the date in the proper format. Note that the final element is a QVALUE. This will display the date where the QINCLUDE is placed.

    Comments

    /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