Introduction
With our screen created let us now look at editing the content to better suit our needs. Ensure you are in design mode with the screen unlocked.
Edit the Card Container
Adding a Field
We will now learn how to add content from the palette to a card container.
- With your Companies List screen open, in the palette navigate to the Form Field - By Data Type section.
- Expand the section and holding the shift key drag Date over the Role field.
- Name the field DOB. This will associate it to the underlying data.
- If you DOB field does not appear where you want it, use the layer section to move it to the right location. You will need to hold the Shift key to drop the DOB inside another component or move out of an existing component.
- This type of field of editing field is not really suitable for our design, so we will switch it for a text field to display the data.
- Right-click on the DOB field.
- Select Change Template.
- A dialog window opens with the available alternatives. Select
Dynamic - Text
and click Select Template.
- The screen is updated, but we need to tell the field the type of data it is receiving. In the properties for DOB, set Type to be
Date
.
Adding a Button
Next we will update the action buttons for the employee.
LinkedIn
.- This style is removing the spacing between the buttons.
Configure Action Buttons
We can add action buttons to our screens that allow us to interact with the data such as Creating, Reading, Updating and Deleting data. Because of this we often refer to these actions as CRUD actions. PhixFlow has CRUD actions built in that we can apply to our buttons. These actions are called actionflows and can be enriched to suit your needs. Let us apply these CRUD actions to our buttons:
- Name,
Companies Form.
- Description,
Add or edit a company
. - Template,
Edit Form
. - Click Create Screen.
Configure an Input Form
We will now setup the following input form.
HERE
- This will allow us to set a size for the screen.
- This will stop users resizing the screen.
- This will ensure the screen always appear on top of all other screens.
- Width, 400px.
- Height, 100%. This will ensure we fill the height of the screen.
- If we make no further changes the screen would open in the middle of the PhixFlow window. Depending on your design this can be desirable. However we will continue to edit our screen properties.
- Top, 0px. Sets the screen to open 0px from the top.
- Right, 0px. Sets the screen to open 0px from the right.
Fields
.- The reason you are asked is that you may already have an actionflow you wish to use or want to create your own actionflow.
- Drag Save Record to the Save button.
- Drag Delete Record to the Delete button.
Filter
When the wizard created the Companies Form it knew that it would be used for adding and editing. Therefore the screen is created with a background filter so that PhixFlow knows if a new record is being added or which record is being edited.
To see the filter
- In the Layers section on the left, click on the top most item CompaniesForm. Note this has the icon to indicate it is an Screen Element.
- In the properties window that opens on the right, expand the Background Filter Rules section. This is much like the filter setup seen earlier in this course.
- Listed are the filter rules, double click on the one in the list.
- The expression is
true
indicating the filter below will always run. Click the filter hyperlink to open the filter condition. - Notice the expression is, _form.CompanyID. _form is referring to the form backing the screen which in turn has the table Companies associated to it. Companies is then referring to the attribute CompanyID on that table.
- No edit is required at this time for our example.
- The expression is
Screen Tidy Up
While the screen is complete we can tidy it up to improve its look and feel.
IDNumber
.- Using the layouts section ensure the new field appears at the top of the form fields.
ID Number
.- Click on the Country Name label.
- In the properties, set the Display Text to be
Country
. - Now using the layer section drag this field below Postal Code.
- If the URL is lost, right-click on the form field, select add backing attribute and choose Web.
- Change the label to
Website
.
P_SG - Currency GBP (£)
.- To set your ow number format see Number Format.
P_SG - Date (Mar-2020)
.- To set your ow number format see Date Time Format.
- Click on the form header.
- In the Layers section under Screen Header, delete the area Right.
- Later in this course we will set the value of this using an actionflow to let the user know if they are editing or adding.
Check Point
Testing
With the Companies List screen open switch to- Double-click on Kassulke LLC to open the edit form.
- Add a website value, such as
www.Kassulke.com
. - Click Save.
- The update will be displayed against the company. All other companies will not be shown. This is because our grid is set to only show the latest record set. We will now look at updating the grid settings to show all records and improve its functionality.
Displaying Data
What is a grid?
There are three elements involved in answering this question, a Table, a View and the Grid itself. The illustration below shows the table at the centre, this is where the data is stored. Views are created on the table that allow the data to be seen. Tables can have multiple views that show different attributes. Finally we have the grids, these are instances of the view that exist on a screen.
Tables vs. Views vs. Grids
Table
View
Grids
Yes
Inherits from the table.
Yes
Inherits from the view.
-
Accessing Tables, Views and Grids
Tables can be found in the repository:
- Under the heading of your application in the tables section.
- Within any packages associated to your application.
- Under the All section within the repository. It is recommended that you only use data within your application or an associated package.
Views. Open the properties of any table and on the properties tab their is a views section which lists all views associated to the table. These can be ppened by double clicking any of the views in the list. It is also possible to get to the view backing a grid via the grids properties.
Grids et al. Grids can be selecting on a screen and the grid properties will open. It is also possible to right-click on a grid to see the View by selectin Show the View Configuration. In the same way a Show the Table Configuration option is also available that will open the table backing the view associated to the grid or any instance of a view such as a pie chart.
Displaying Data Setup
The information provided above is very useful, but if you are new to PhixFlow its helpful to see it applied in a practical example. We will look at making a number of changes that will show how this information gets used in practice.
Default Data Range
The Default Data Range define what Recordset to provide to the View, Screen or Card Container. The option can be set at the table, view and grid level, each inheriting the data range from the item before.
Setup
For our example we need to see all the recordsets.
All
.Expand | ||
---|---|---|
| ||
Select which recordset data is displayed.
Include History Records, is an additional Data Retrieval Option which stipulates whether to show historic records such as items that have been replaced. This can be particularly useful when creating a screen which displays changes to a record over time as History records will display all the changes recorded over the lifecycle of a record |
Filtering
Filtering cascades down from the view to the grid. When a filter is created it is owned by the table and is listed in its properties. Note that screens can also have a background filter, as we saw earlier, we can set a filter on the screen to filter the results returned each as to only show the selected record.
Setup
- Name,
Approved Companies
. - Select an Option,
Status
. - Enter Text,
Approved
.- In a previous filter we switched this to be a PhixScript box, here we want to check each record has the string value Approved in its Status column, therefore we leave this as a literal (text value).
Sorting
The records are returned in the order they appear in the database which is typically by ID. We will set our sort order to be by Company Name, then Industry and finally by updated time.
Setup
By Company, Industry and Date
.CompanyName, Industry
and UpdatedTime
into the area below Sort Order Attributes.Auto Save
Column Widths
Tables → Views → Grids
- Use Custom Data Range
- Periods
- Inheriting the period from the table.
- Table Period.
- Adding attributes
- Relational Attributes
- Reordering Attributes
- Hiding Attributes
- Conditionally Hiding Attributes.
- Basics
- Bold Text
- Available Styling i.e. default styles.
- Conditional Formatting Background Colour
- Cell and Row.
- Removing the Title
- Labelling and double header?
- Link to in depth How To guide
Adding a Chart
- Simple Setup
- Colour Maps
- Link to setting up more chart types.
It can be very useful to find a layout, component or container. There are two ways to do this:
Using Layers
The Layers pane is expandable from the left of the screen canvas. Select an item:
- on the canvas to highlight it in the Layers pane
- in the Layouts pane to highlight it on the canvas.
Using Find in Repository
Right-click any item on an unlocked screen and selectTip |
---|
To check whether a component is shared with multiple applications, open its properties and check the Parent Details section, which names the application or package to which the component belongs. For example a component that is shared between several applications has a package as its parent; see Package. |
Styles
explanation
Style Hierarchy
- Application Styles
- Shared Style
- Local Styles
- Formatting Rules
- Overriding Styles Best Practice
- Clearing Styles
Creating Screens from the Home page
- Options
- Templates
- Complete
- Blank
- Screen Options
- Floating
- Size
- Open Maximised
- Creating from an ERD
- Creating from a Workflow
- Available Unused Actions.
Data Type and Formatting
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|