Foundation Actionflows - Training Exercise

 Training Exercise

You have now learnt how to create and configure simple Actionflows in PhixFlow. To reinforce the techniques you have learnt, complete these assignments. Note: A training instance is required to complete these assignments.

Don't worry, this is not an exam. You can use the Help to broaden your understanding and assimilate knowledge. A number of hints have been provided; use these if you are struggling as each hint gives you more information on the solution.  

.

 Assignment Hint

Remember to close and reopen your screen if you do not see the changes you expect.

Assignment 1

Difficulty Level: Mild

Task 1

On the Menu (screen), configure the Students button to open the Student Management screen.

.

 Hint (Which Action Node?)
 Solution

Actionflow Setup


Task 2

Configure the Save and Delete buttons on New Student Form screen to save and delete data in the School Students table.

.

 Solution

Save Actionflow Setup

Delete Actionflow Setup


Assignment 2

Difficulty Level: Medium

Task 1

On the Student Management screen, when a new student is created using the New Student button, we want the Intake Year field on the New Student Form screen to be prepopulated with the current year in the format, YYYY.

.

 Hint 1 (Which Actionflow?)

Modify the Actionflow on the New Student button on Student Management screen.

 Hint 2 (How to Show the Current Year)

Use one of PhixFlow's Functions to retrieve the current year. 

What type of Action Node can perform a function?

 Hint 3 (Which Action Node?)

Use the dateGet function in an Output Attribute in a  Calculate action.

See 1.11 Calculate Action Configuration.

 Hint 4 (Output Attribute)

When creating your Output Attribute, set the Type as Integer. Your Expression should be:

dateGet(now(),_YEAR)

Note: The function now can also be used. This will return the date with a Type of String and requires the field that is being mapped onto to have a Type of Date set.

 Hint 5 (Helpful Reminders)

Check your mappings all the way through the Actionflow and remember to map your new Output Attribute onto the IntakeYear field.

 Solution

Actionflow Setup & Mappings

Note: The function now is also an acceptable solution - see Hint 4.


Task 2

When a new student is saved, we want a confirmation screen to appear that allows the save to be confirmed or cancelled.

Bonus Task: add a static text component to the confirmation screen with the Display Text, "Are you sure you want to create the new student,". In the Actionflow, map the name of the new student onto the dynamic text component, Message.

.

 Hint 1 (Confirmation Screen)

Firstly, create a confirmation screen using the Confirmation template. See 1.13 Confirmation Message Configuration.

 Hint 2 (Which Actionflow?)

Modify the Save Actionflow on the New Student Form screen.

 Hint 3 (Bonus Task)
  1. From the palette, add a Header 1 - Static component to the screen and add the Display Text specified above
  2. Within the Confirmation phase of the Save Actionflow, change the Input Connection Point to the New Student Form
  3. Map across the Name
  4. Map the Name onto the Message dynamic text component.
 Solution

Actionflow Setup & Mappings


Task 3

Set up the Students grid on the Student Management screen to contain a button in the Web column that open the student's website when clicked. Use the Action Icon  Style, WebsiteIconStyle.

  • Unhide the WebIcon attribute by right-clicking the grid and selecting  Show the View Configuration.

  • In the View Attributes section, double-click the WebIcon attribute to open the  Properties tab
  • On the  Styles tab, in the Grid Settings, untick Always Hidden
    • Note the other hidden attribute, Website, this contains the URL. Leave this attribute hidden.

.

 Hint 1 (Creating Actionflow and Icon Style)

Set up the Actionflow and icon style by clicking the WebIcon header in the grid. In the Properties for the WebIcon View Attribute, click the  Actions tab.

Set an Action Method of Actionflow and create a new Actionflow.

 Hint 2 (Actionflow)

This Actionflow has a similar setup to 1.14 Open URL Action Configuration, except it does not require a  Calculate action.

 Hint 3 (Icon Style)

For the Action Icon Style, click  List Styles to see the preconfigured styles in the app. Drag the WebsiteIconStyle style into the Action Icon Style box on the Actions tab, or you can create your own style using the WWWIcon.

 Solution

Icon Style and Grid Setup

Actionflow Setup & Mappings

  


Assignment 3

Difficulty Level: Hot

Task 1

When a new student is created on the New Student Form screen, we want the form to contain validation. Create a new validation rule stipulating:

  • the Name field is mandatory
  • the Name field must contain at least 3 characters
  • the Name field must adhere to the pattern, ^[A-Za-z\s-]+$

.

 Hint 1 (How to set validation)

Remember validation is setup on the inner input field.

 Hint 2 (Mandatory)

Setting a field as mandatory is configured using the tick box and toggle button in the Validation section of the Properties tab.

 Hint 3 (New Validation Type)

Create a new validation type with the following settings:

Base Type: String

Minimum Length: 3

Pattern: ^[A-Za-z\s-]+$

 Solution

Screen Setup


Task 2

We want the status of a course to be dynamically updated to On Hold if the associated classroom's status is changed to Unavailable.

  • On your ERD, add an attribute to the School_ClassRooms data, with the name, ClassroomStatus, a Type of String and a blank Expression

  • On the Classroom Availability Management screen, add in the attribute you just created
  • Set up the screen so that the status can be changed using a fixed (custom) drop down list with the values, Available and Unavailable
    1. Your screen setup should look similar to this:

.

 Hint 1 (Which Actionflow?)

Configure the Save Actionflow on the Classroom Availability Management screen.

 Hint 2 (Which Action Node?)

Use a   View action and use the Help in 1.15 View Action Configuration.

 Solution

Screen Setup

Actionflow Setup & Mappings

Output Attribute in Calculate Action

Actionflow Setup & Mappings


Task 3

We want to see a list of the courses that each student is enrolled on. Set up the Courses Enrolled button, using a lookup, on the Student Management screen that populates the Student is enrolled in tile. 

  • Map onto the string field, CourseIDFromView

Bonus Task: Map the student name onto the dynamic text component, StudentName, so that when the Courses Enrolled button is pressed, the selected student name shows.

.

 Hint 1 (Lookup Table)

When creating your Lookup, you'll need to select the primary table, School Course Attendees.

 Hint 2 (Background Filter)

Once your Actionflow is setup and the CourseID is being mapped into the CourseIDFromView field, remember to create a background filter.

 Solution

Actionflow Setup & Mappings

Output Attributes in Calculate Action

Lookup Mappings

Actionflow Setup & Mappings

Background Filter

.

Once you have verified your Actionflow is working, finish by hiding the tile (Column 2) that contains the CourseIDFromView string field.