Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Designing forms before starting development and creating templates leads to efficient app building and reduced development time.

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=tgb9L75fjaE&list=PLbPt6SI1Zhb8CnWh7Gvopto7D6LEwcB9A&index=5
height500

In this session we will begin building a feature-rich application, using the knowledge we have acquired so far and expanding on it. To recap the steps in the video:

Create

...

Businesses Streams

  1. Create a new Dashboard Anchor_Hlk529356596_Hlk529356596 with the Name StandardActionDashboard
  2. Create a new Form with the following settings:
    1. Name: StandardActionForm
    2. Show Vertical Scrollbar: tick
      • This allows content to expand without compromising visibility.
    3. Auto Size: tick
      • This will resize the area to automatically use up all available space.
    4. Direction: Column
      • This forces the layout into a single column.
    5. Justify: Flex Start
      • Justifies the content to the left.
    6. Align: Stretch
      • Vertically spaces the content out evenly using the available space.
    7. Clear all Position Settings except Order and Tab Index
    8. Prevent Dragging: tick

Create a Standard Layout

  1. Holding the Shift key add a new Area to the form with the following settings:
    1. Name: AreaHeader
    2. Direction: Row
      • This forces the layout into a single row.
    3. Justify: Flex Start
      • Justifies the content to the left.
    4. Align: Center
      • Centers the content vertically.
    5. Position Settings:
      • Order: 1
      • Tab Index: 1
      • Height: 60px
      • Prevent Dragging: tick
      • All other Position Settings should be blank.
    6. Add a new Shared Style called Title
      • Font Size: 24
      • CSS properties:
        • CSS Tag: padding-left
        • Value: 10px
    7. Add a Static Text box to the AreaHeader and apply the Shared Style Title
    8. In the configuration of the Title, remove the Width and Height
  2. Holding the Shift key add a new Area to the form with the following settings:
    1. Name: AreaBody
    2. Show Vertical Scrollbar: tick
    3. Auto Size: tick
    4. Direction: Column Wrap
      • Places the content into columns according to size and order
    5. Justify: Flex Start
    6. Align: Stretch
    7. Position Settings:
      • Order: 2
      • Tab Index: 2
      • Prevent Dragging: tick
      • All other Position Settings should be blank. The Auto Size will automatically resize this element to use all the space available.

Create a Footer Template

  1. Find the SimpleButtonArea in the repository created in the first video.

Remember it is possible to find a component on a Dashboard and use the right click option Find in Explorer.

  1. Use Copy as a template to create a Template from the button configuration that can be used again.
  2. Drag this SimpleButtonArea Template onto the dashboard. This will be the footer.

Update the Standard Layout

  1. Add the new SimpleButtonArea template to StandardActionForm
  2. Position Settings:
    1. Order: 3
    2. Tab Index: 1
    3. Width: 100%
    4. Height: 45px
    5. Prevent Dragging: tick
    6. All other Position Settings should be blank.

...

Create a Form Template

  1. Select the StandardActionForm in the repository
  2. Use Copy as a template to create a Template version of the form configuration that can be used again.

...

  1. Stream on the Contacts analysis model. Give it the name Businesses.
  2. Set the Period of the stream to Transactional.
  3. Add attributes to the stream.

    Name

    Type

    UID

    Integer

    Name

    String

    Type

    String

    Address1

    String

    Address2

    String

    Postcode

    String

    AnnualTurnOver

    Decimal

    CustomerSince

    DateTime

    Description

    Bigstring

    Active

    TrueFalse


  4. Create another Stream called BusinessNotes.
  5. Set the Period of the stream to Transactional.
  6. Add attributes to the stream.

    Name

    Type

    UID

    Integer

    NoteDate

    DateTime

    NoteByUser

    String

    Note

    String

    BusinessUID

    Integer


  7. In the Contacts Stream, create a view called Business ContactsAdd all attributes and hide the UID.

Create the Dashboard

  1. Create a new Dashboard with the Name Businesses, and click on Open Maximised.
  2. Divide the dashboard into three portions using one vertical line, and then a horizontal line in the left pane.

Create the Grid View Portion

  1. Open the configuration form for the Businesses Stream, and bring the new dashboard to the front.
  2. Drag the stream icon from the configuration form onto the top left of the dashboard, to create a Grid View.

Create the Details Portion

  1. In the bottom left portion, create a new Form called BusinessDetails.
  2. Add a Tabs component from the palette.
  3. Find the Tabs component in the repository and set:
    1. Position Settings: Top, Left, Right and Bottom to 0px
    2. Prevent Dragging: tick
  4. Update the Tab Header to Business.
  5. Update the Title display text to Contact Details.
  6. Add a Dynamic Text component called Name.
    1. As Name is also the name of an attribute on the stream backing our form, PhixFlow will automatically display the value held in the attribute in the new component, in this case the Dynamic Text.
    2. Also note that if you give a component the name of a context variable, PhixFlow will also link the context variable value to the new component. If you have both a stream attribute and a context variable with the same name as your new component, the attribute will take precedence.
  7. Use the Template StandardActionForm to create a layout on the first Tab. Drag all the attributes from the Businesses stream onto it.
  8. Set the Title to Details.
  9. Logically order the Attributes and hide the UID field.

Set the Default Sort Order and Link Views

  1. Create a Default Sort Order.
  2. Drag the UID from the Grid View onto the details section to link the two elements.


Tip

We recommend that you always create a default sort order on all views.


Go into App Mode and enter some data to test the new configuration.

Create a Contacts Grid

  1. Exit App Mode.
  2. Open the configuration form for the stream Contacts, and bring the Businesses dashboard to the front.
  3. Click on the Contact Details tab on the Businesses dashboard.
  4. Drag the Stream View Business Contacts from the configuration form onto the Contact Details tab.
  5. Refresh the view and the results will be displayed.
    This view will be revisited in a later chapter of the course, when we will link contacts to specific businesses.


Panel

Next video: 5. Custom Actions