Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
configuration:lisanew:tableproperties [2019-10-23 08:03] Simon Jehrbo removed |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Table properties ==== | ||
- | {{ : | ||
- | |||
- | You can also add a **descriptive expression**, | ||
- | |||
- | ==== Descriptive Expressions ==== | ||
- | |||
- | As described, Descriptive Expressions are SQL code. When typing them, the format is that you write the following | ||
- | |||
- | < | ||
- | SELECT --This is predefined and not visible | ||
- | |||
- | [company].[name]–this is what you modify | ||
- | |||
- | FROM [tablename] WHERE [idTABLENAME]= THE_ID_OF_THE_CURRENT CARD –This is predefined and not visible | ||
- | </ | ||
- | |||
- | If you need to do a subquery, you should have it within (). An example could be when getting something from the string table, to get the text from an option field. See the example below as well. | ||
- | |||
- | < | ||
- | SELECT --This is predefined and not visible | ||
- | |||
- | (SELECT [da] FROM [string] WHERE [idstirng] = [company].[buyingstatus] -- this is what you modify | ||
- | |||
- | FROM [tablename] WHERE [idTABLENAME] = THE_ID_OF_THE_CURRENT_CARD -- This is predefined and not visible | ||
- | </ | ||
- | |||
- | In the above example we get the Danish text from the option field Buying Status. | ||
- | |||
- | If you need to combine multiple things, you can do it by using the + sign. Just remember that you need to add whitespaces manually. | ||
- | |||
- | < | ||
- | [company].[name] + ' - ' + [company].[city] | ||
- | </ | ||
- | |||
- | The above example simply adds the Company name, then a whitespace a - another whitespace and then the city. | ||
- | |||
- | === Descriptive examples === | ||
- | |||
- | Here you can find code to descriptive expressions that we use often. This code can be a start point that you can modify when creating your own descriptive expressions. | ||
- | |||
- | __Company name as descriptive on an other card__ | ||
- | |||
- | Set company name as descriptive expression on a Role table (not on the company card, if you have an other table just change role to your table name): | ||
- | |||
- | < | ||
- | (Select[name]from[company]where[company].[idcompany]=[role].[company]) | ||
- | </ | ||
- | |||
- | __An option from a option list as descriptive__ | ||
- | |||
- | If you want to have a option from a option list as a dresciptive expression use the following code. This eg. gets the TypeOfRole from a Role table to be used as a descriptive expression. If you want to get an other language change sv to correct language. | ||
- | |||
- | < | ||
- | (Select[sv]from[string]where[string].[idstring]=[role].[typeofrole]) | ||
- | </ | ||
- | |||
- | __Two fields as descriptive expression__ | ||
- | |||
- | If you also want to have the company name and role as a descriptive expression, eg. & | ||
- | |||
- | < | ||
- | (Select[name]from[company]where[comany].[idcompany]=[role].[company])+' | ||
- | </ | ||
- | |||
- | Don't forget the brackets! | ||
- | |||
- | ==== Table properties ==== | ||
- | |||
- | ^ Name ^ Description | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | | '' | ||
- | |||
- | ==== Record Access ==== | ||
- | Please see [[/ | ||
- | |||