Current Record: relationships.ini_file #20

relationships.ini File Reference Table of Contents relationships.ini File Reference Overview Field Directives Glance Lists Relationsh...

Current Record: relationships.ini_file #20

relationships.ini File Reference Table of Contents relationships.ini File Reference Overview Field Directives Glance Lists Relationsh...

relationships.ini_file

[Permalink]

relationships.ini File Reference

Overview

The relationship.ini file is a configuration file which is associated with a single table of a database application. It provides metadata about the table's relationships to other tables to help Xataface dictate how they should be included in the application.

Field Directives

The following directives may be added to a field's section of the relationship.ini file to customize the field's behavior. Some directives are not applicable to all fields.

Name Description Version
__sql__ The SQL query that defines this relationship. all
action:visible? A boolean value (0 or 1) that indicates whether this relationship should be visible in the record tabs. all
action:condition An expression that evaluates to a boolean that determines at runtime whether the relationship's tab should appear in the record tabs. all
action:permission? An array that determines at runtime whether the relationship's tab should appear in the record tabs for the logged in user. Also see: Relationship Permissions all
action:label? The label that appears in the relationship tab for this relationship. Default is to use the relationship name. all
action:order? An integer value that specifies the order of this relationship tab in relation to the other tabs. all
action:delegate? The name of an alternative action that can be used instead of the standard related records list. One possible value for this would be "related_records_checkboxes" which would provide the user with a checkbox group to select the records that should be part of the relationship rather than the usual related record list. 1.0
actions:addexisting? Boolean value (0 or 1) indicating whether the action to add existing records should exist in this relationship. all
actions:addnew? Boolean value (0 or 1) indicating whether the action to add new records should exist in this relationship. all
actions:remove? Boolean value (0 or 1) indicating whether the action to remove existing records should exist in this relationship. all
list:type Optional type of list to use for the related record list. Possible value: "treetable" 0.8
meta:class An optional special class to assign to the relationship, e.g. "parent" or "children". 0.8
metafields:order? If the relationship should have a default order this specifies the field that should be used for this sort. all
visibility:fieldName If given the value hidden will make that particular fieldName disappear in the relationship. This will only be applied for that particular relationship. all
visibility:find? If given the value hidden this will cause the related fields to not appear on the find form. Normally each relationship is provided a section of the find form to enable users to find records that contain at least one match in the related records. 1.3rc4
vocabulary:existing? Specifies a valuelist that can be used to provide the set of records that can be added to this relationship. If target table has a single column primary key then the valuelist should use the primary key for the value. If it has a multi-column primary key, then the value should be in the form key1=value1&key2=value2 etc... See also relationshipname__getAddableValues? delegate class method for a programatic solution. 1.0

Glance Lists

In the view tab, related records are shown by default in the left column. These sections are called glance lists. The field directives below customize how the glance lists are displayed.
Name Description Version
section:visible? Boolean value (0 or 1) indicating whether the relationship information should appear as a section. 0.7
section:condition? An expression that evaluates to a boolean that determines at runtime whether the relationship information should appear as a section. 0.7
section:permission? An array that determines at runtime whether the relationship information should appear as a section for the logged in user. Also see: Relationship Permissions 0.7
section:class An optional value (main) to specify that this section should be in the main column instead of the left sidebar. Default is left. 0.7
section:label? The label that appears in the header of this related record section. Default is to use the relationship name or action:label? if defined as documented above. 0.7
section:order? Integer. The order of this related record section in relation to the other sections. Default is 0. 0.7
section:limit? Integer. The number of records to show in this related record section. Default is 5. 0.7
section:sort? A comma-delimited list of columns and optionally direction to use in sorting this related record section, similar to an ORDER BY clause in SQL. E.g. section:sort="some_column asc" or section:sort="col1 asc,col2 desc,etc..." 0.7
section:filter? A string SQL clause to be used to filter the results. 0.7

Also see: Hiding sections in 1.0

Relationship Permissions

See Relationship Permissions

See Also

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved