Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
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. These techniques can be applied to other layouts.
- With your Companies List screen open, in the palette navigate to the Form Field - By Data Type section.
- Expand the section and holding Holding the shift key, drag Date over the Role field.
- Name the field
DOB
. This will associate it to with the underlying data.- If you your 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 to a text field to display the data.
- Right-click on the DOB field.
- Select Change Template.
- A dialog dialogue 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.
- Select the middle phone button.
- Right-click and select Delete Selected Objects.
- Follow the prompts.
- Now from the palette → Buttons - Additional section of the Palette, holding shift, drag LinkedIn in between the two existing buttons or use the Buttons area in the layers.
- Name it
LinkedIn
. - To get the button where we want it, in the layer layers section drag the LinkedIn buutton button to the end of the Buttons:
- Image RemovedImage Added
- The styling is slightly different, so we will correct this. Note we will be covering styles in detail later in this course:
- Click on the Email button and its properties open.
- Drag the tab header to the left of the properties. This will allow us to compare styles in a moment.
- Click on the LinkedIn button and ensure its properties are on the right.
- The two properties windows should be open side by side.
- Open the styles Styles tab on both.
- Scroll down to the shared styles Shared Styles on both.
- Drag
P_SG - Button No Background
from Email to LinkedIn.
- Drag
- In the CSS Properties of Email, drag the margin style to the CSS Properties of LinkedIn.
- This style is removing the spacing between the buttons.
- Your setup should appear like this:
- Click
on both property editors.Insert excerpt _finish _finish nopanel true
- Click on the Email button and its properties open.
Configure Action
ButtonButtons
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:
- Right Right-click on the Companies grid and select Create CRUD Actions.
- PhixFlow opens a wizard that will guide us through the process.
- The First first option is Screen. Here we can select a screen we will use as our editing screen, or we an can create one. We will need to create one.
- Click
to add a new screen.Insert excerpt _addIcon _addIcon nopanel true - The Screen Creation Wizard opens,
- Name,
Company Companies Form.
- Description,
Add or edit a company
. - Template,
Edit Form
. - Click Create Screen.
- Click
- A screen is created and associated to with the actions for adding and editing records.
- The First first option is Screen. Here we can select a screen we will use as our editing screen, or we an can create one. We will need to create one.
- Drag the actions to the appropriate buttons, note you can drag the edit action over the grid and this will set the double-click action on the record:
- Close the Grid Actions dialog dialogue.
- To Access access our new Company Companies Form screen, lock your screen and double-click a record in the grid. This will open the Company Companies Form screen with one the record selected.
Configure an Input Form
We will now set up the following input form.
Add the Crud buttons
Create a new screen and show more screen options
About Tables → Views → Grids
Adding Data as a Grid
- Use Custom Data Range
- Periods
- Inheriting the period from the table.
- Table Period.
- Adding Crud buttons after prompt.
- 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 Data as a Card Container
- The Container
- Table
- View
- Filtering
- The Cards
- Design and App mode display.
- Adding filters dynamically
- Changing the backing attributes
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 selectImage Removed
Tip |
---|
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
Image Added
- The details of the record we double-clicked on have been passed to the screen but we must set up how we want the data to be displayed.
- When opening a screen using an action it will be locked. Unlock the screen.
- From the toolbar select properties to open the properties of the screen.
- Untick Open Maximised.
- This will allow us to set a size for the screen.
- Untick Allow Manual Resizing.
- This will stop users from resizing the screen.
- Tick Always on Top.
- This will ensure the screen always appears on top of all other screens.
- Click on the Styles tab.
- Set:
- 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.
- Click
. Note you may need to close and reopen the screen for the new properties to take effect.Insert excerpt _finish _finish nopanel true
- Untick Open Maximised.
- Our Screen is now sized and positioned.
- Because the screen was created using the wizard, PhixFlow automatically associates it with the Companies table.
- To see the associated table, or if we wanted to manually associate a table:
- In the Layers on the left, expand the tree.
- One of the top areas will have a
icon. This is the form and it is here where the table association is set. In our example, this is called Companies Form.Insert excerpt _tableOnly _tableOnly nopanel true - Click on this form.
- The Primary Table setting indicates where the data is coming from for this screen. Note, data can be independently set for grids and card containers.
- We can click the
to show a list of available tables and drag one into this form field. For our example, this is not necessary.Insert excerpt _tableOnly _tableOnly nopanel true
- To see the associated table, or if we wanted to manually associate a table:
- For this reason, in the toolbar you will notice the
button is enabled. To see this option you will need to click the three dots. Click theInsert excerpt _attributes _attributes nopanel true
button.Insert excerpt _attributes _attributes nopanel true - Image Added
- From the list of attributes select all the items from Company ID to Status.
- Click and hold these attributes and drag them onto the Companies Form.
- You will then be asked how you want the attributes to be displayed, select
Fields
. - Image Added
- PhixFlow recognises you are creating an input form and asks if you want to create a Save and Delete option.
- The reason you are asked is that you may already have an actionflow you wish to use or want to create your own actionflow.
- Click Yes to Add Action.
- PhixFlow creates Save and Delete actionflows.
- Drag Save Record to the Save button.
- Drag Delete Record to the Delete button.
- Close all the open dialogue boxes.
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 either a new record is being added or an existing record is being edited.
To see the filter
- In the Layers section on the left, click on the topmost item CompaniesForm. Note this has the icon Image Added 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 to open it.
- 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 with it. It 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.
- The background filter on our screen relies on the CompanyID field, as this is the primary key for the table. However PhixFlow knows this and has added the Company ID already but automatically hidden it, you can see this in the Layers as illustrated below. Note the eye icon to denote the component is hidden.
- Image Added
- Click on the CompanyID field we added to the screen, to highlight it and we will remove it by selecting Permanently Delete.
- CompanyID is hidden, we could unhide it by selecting it in the Layers and on the properties style tab unticking hidden. However, we do not want the users editing or setting this value. We could make this form field read-only, using the Read-Only tick box but this leaves the input box in place and could confuse our user. Therefore we will add a stylised read-only form field from the palette.
- From the palette, navigate to the Form Fields - Read Only section and drag an Integer Field onto the screen and call it
IDNumber
.- Using the layouts section ensure the new field appears at the top of the form fields.
- Right-click on IDNumber and select Add Backing Attribute.
- From the dialog box select Company ID and click Next.
- The screen should look like this:
- Image Added
- The CompanyID is shown correctly but the field label is not ideal.
- Click on the field label, either on the screen or in Layers.
- In the properties set Display Text to be
ID Number
. - Click
.Insert excerpt _save _save nopanel true
- From the palette, navigate to the Form Fields - Read Only section and drag an Integer Field onto the screen and call it
- We will change the label on the Country Name field and move it to below the Postal Code.
- Click on the Country Name label.
- In the properties, set the Display Text to be
Country
. - Now using the layers drag this field below Postal Code.
- We will change the field type for web to include a button that will load the website.
- Select the Web form field.
- Right-click and select Change Template.
- Scroll across to URL, select it and click select Template.
- If the URL is empty, right-click on the form field, select add backing attribute and choose Web.
- Change the label to
Website
. - Click
.Insert excerpt _save _save nopanel true
- We will add a number format to turn over.
- Select the inner input field of the Turn Over field.
- In the properties, click the dropdown for Number Format and select
P_SG - Currency GBP (£)
.- To set your own number format see Number Format.
- Click
.Insert excerpt _save _save nopanel true
- We will add a new date format for the Customer Onboarded date.
- Select the inner input field of the Customer Onboarded field.
- In the properties, click the dropdown for Date/Time Format and select
P_SG - Date (Mar-2020)
.- To set your own number format see Date Time Format.
- Click
Insert excerpt _save _save nopanel true
- Finally, we will tidy the header.
- Click on the form header.
- In Layer 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
Image Added
Testing
With the Companies List screen open switch to
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
- 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.