Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
This page is for application designers who need to create views of data and bind them to components on screens. Todo-Anthony- check this page is correct when the GUI is finalised.
Overview
PhixFlow stores data in tables , formally known as streams. Tables (previously called streams). Views are used to display the data in these Tables. Often they can contain more data than you want to show to a user. For this reason, whenever you show data on a screen, you first compile a view of the data, which only displays the information you specify.A view is made up
Views Consist of:
- Attributes
- Attributes from the base table.
You specify Specify which attributes to include in your view. You can hide attributes that you want access to but do not necessarily want a user to see. For Example , such as the UID of a record. - Attributes from related tables.
These are the attributes available to the view as the table they originate from shares a relationship with the base table as defined in the ERDs; see Understanding ERDs. Views which contain these type of attributes are referred to as a relational view.
- Attributes from the base table.
Records:
- For each table, the view includes records specified in the tables default period. This can be all data (usually for transactional data) , or only the latest.
- Can be sorted, filtered and ordered.
- Sorting and Filtering
- You can filter and sort records. See Filtering and Sorting Data.
View Components
The views below display data in different ways.
: the attributes form the grid columns and data records are displayed in rows. PhixFlow can add scroll bars or paging where grids cannot be accommodated by the screen size.Insert excerpt _grid _grid nopanel true
graph_lineInsert excerpt _ _graph_line nopanel true
: rather than using a form to display data, you can use a card. Any palette item can be added to a card which offered great flexibility.card _card nopanel true
: attributes are represented in different segments of a pie chart, with values aggregated to represent the segment size.Insert excerpt _chart _chart nopanel true
verticalInsert excerpt _graph_
verticalhorizontal _graph_
: attributes are represented on the vertical axis, with values aggregated and represented in the bar length.horizontal nopanel true
horizontalInsert excerpt _graph_
horizontalvertical _graph_
: attributes are represented on the horizonal axis, with values aggregated and represented in the bar height.vertical nopanel true
chartInsert excerpt _graph_
chartline _
: attributes are represented as points on a horizontal axis, with values aggregated and setting the point position on the vertical axis.graph_line nopanel true
cardInsert excerpt _
cardform _
These views can be added a screen, content can typically be added by dragging specific attributes from a table onto them. In the case of a card view any palette item can be added: attributes are represented by different fields. Usually a form is linked to an action on a grid. For example, the application user selects a line on a grid, and the form displays the data from that record.form nopanel true
Form and card components are special data components, as they can contain other elements, usually fields and labels.
How to Create and Display a View
As views are designed to display data on a screen, creating a view includes binding it to a componentfor more information on the specific of setting up charts and graphs see Creating Dashboards and Reports.
Step
1 Select a tableDrag a table onto a screen, this can be achieved by dragging1 Select a Table
There are several ways to show data on a screen:
- From an Entity Relationship Diagram (ERD), select a table and use the Create Screen option; see Creating a Screen from an ERD Table.
- Drag a Table from the repository or a tables icon from its properties directly onto a screen.
- A list of available tables is available by clicking the Tables button on the toolbar.
- This method will typically set the data for the backing form to that of the table.
- PhixFlow asks you how you want the data to be displayed, select the desired option:
- The view will be added to the screen.
Step
22 Select
attributesthe Attributes
- Drag attributes from the Attribute Selection Available Attributes window onto the view.
- Start with attributes from the current (base stream) table.
- Optionally, click on related streams tables to show additional attributes that are available.
- When you have added dragged all the attributes you require, close the window.
Attribute Selection
Step 3 Apply filtering and sorting for records
- .
- These attributes can be changed at a later date, when a screen is unlocked:
- For Forms, click the attributes button from the toolbar.
- For Card Components (and Kanbans), right-clicking on the card and selecting Show table view configuration
- For Grids and Charts: right-clicking on the item, selecting Show Table view configuration. In the attributes section click
.Insert excerpt _attributes _attributes nopanel true
- See Available Attributes Window for details.
Step 3 Apply Filtering and Sorting
You have now created your view and added it to a screen. Optionally, specify if you want to apply any filters or sort orders to the data
records:
- Select the view you have added.
You may need to right-click the view and select Show Stream table View Configuration.
The properties tab opens:PhixFlow opens the view properties.- For Forms, we can only apply filters. Right-click on a screen → Show Element Details → Background Filter Rules. This setup is slightly different see Screen Element for guidance.
Select an existing Default Sort Order, Default Filter or Background Filter or create new ones, see Sort Order and Filter
Note the filter are applied when the use sees the view, however the default view can be removed by the userfor more detail.
Save all your changes and PhixFlow applies filters.
Tip Users can remove a Default Filter, where as Background Filters are permanent.
Reusing Views
Once you have created a view, you can reuse it in multiple locations. In the repository navigate the the table which owns the view, the base table, open the table and in the views section drag the desired view onto your screen. Be aware however that changes made to the view will affect all instances of that view.
Form Field Name
When you drag attributes from the Attribute Selection window or table onto a form, PhixFlow adds a field and label for each attribute. By default, the label is the attribute's name. However, for an attribute from a related streamtable, the Display Name will be shown and not the foreign key value.
For example:
Example | Base Table | Related Table | Value Displayed | Form Field Label |
---|---|---|---|---|
syntax | table.UID | RelatedTable.ForeignKey | RelatedTable Attribute set to DisplayName | - |
Example Syntax | Company.UID | Supplier.RelatedCompany | Supplier attribute set to RelatedCompanyName | Related Company Name |
Example Values | 1024 | 1024 | "Cloud and Pixel Ltd" | Related Company Name |
For information about primary and foreign keys and the Display Name option; see Understanding ERDs.
Alternative Setup
TODO ANTHONY when we get this
HTML Comment | |
---|---|
Insert excerpt | _data_bind | _data_bind |
nopanel | true |
Insert excerpt | _attributes_show | _attributes_show |
nopanel | true |
Insert excerpt | _filter | _filter |
nopanel | true |
Tip | |
If a form field or dynamic text field exists on a screen, it will link to an attribute in the data backing the screen by name, however you can also right-click on these components and select Change Backing Attribute to link it to any available attribute. |