'views': Configuring the Specific Database Table Interactions

'views' Setting Overview and Definition

Setting Definition Example

'views' Setting Overview and Definition

A View is an interaction with a certain database table. The views setting in the InteractForm_Settings record defines a map of the Views and their corresponding settings.

This setting is a HASHMAP OF View.

The settings that you can configure for a certain View are stored in Lycia LowCode's View record.

 

Defining the View Settings in .4gl File

In .4gl file, define the settings of the View level in the following way:

LET <InteractForm_Settings>.views[<db_table_name>].<llc_setting_name> = <value>

<InteractForm_Settings> here is the name of the settings variable you define at the beginning of your interaction with Lycia LowCode, <db_table_name> is the name (or the alias) of a database table that is used in that View, and <llc_setting_name> is the specific setting you configure.

Attention: The <llc_setting_name> in the example above is a setting from the Views record only. If you use the views setting, make sure you pick the settings that are available for that settings scope.

 

Return to top

Defining the View Settings in .fm2 Form File

In .fm2 file, use the views setting in the following way:

<form xmlns="http://namespaces.querix.com/2015/fglForms" interactSettings='[

{

"id":"settings",

"paged_mode":0,

"views": {

"<db_table_name>" : {

"<view_setting_1_name>":"<view_setting_1_value>",

"<view_setting_1_name>":"<view_setting_1_value>",

"<view_setting_1_name>":"<view_setting_3_value>"

}

}

}

]'>

Note: For definition in .fm2 file, every views setting must come in pair with the id setting. The id is a reference for the collection of View settings.

Each program used with Lycia LowCode has at least one View, but you can create as many Views as you need, defining separate collections of settings for each of them.

 

Return to top

Setting Definition Example

Using a views setting in .4gl file:

LET rec_settings.views["test05"].navigation_status="nav_page_of"

Using a views setting in .fm2 file:

<form xmlns="http://namespaces.querix.com/2015/fglForms" interactSettings='[

{

"id":"settings",

"paged_mode":1,

"views":{

"test05": {

"screen_record":"scr_test05",

"comboboxes":{

"test05.test05_fk_char":{

"foreign_key":"test06.test06_primary_key",

"show_columns":[

"test06.test06_col1",

"test06.test06_col2"

]

}

}

}

}

}

]'>

 

Return to top

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.