| 146 | It is possible to include the target field in the context expression: |
| 147 | |
| 148 | E.g. in this example, if we wanted to filter by location_id, then "(location)" would be a valid field selector for both resources: |
| 149 | |
| 150 | {{{#!python |
| 151 | # Filter expression valid for both project_project and org_office: |
| 152 | query = S3FieldSelector("(location)") == 43L |
| 153 | }}} |
| 154 | |
| 155 | Context paths can be used for various purposes, e.g. |
| 156 | |
| 157 | - profile pages which show multiple resources all in the "context" of the same primary record, e.g. all offices, projects, etc related to the same location (=primary record) |
| 158 | - filter forms across multiple resources (dashboards, not implemented yet) |
| 159 | - global filters for all pages (s3db.context) |