Flow Help
Search…
Develop your first app
Here is a guide for how to create a simple app.
The app will allow the end-user to create an issue report that will be saved to a database.
As a Flow designer you will get to know how to:
  • Create a new workflow
  • Create a user step where the user can enter data
  • Fetch and use data from a database
  • Insert data to a database
  • Publish an app
You will need an SQL server database to complete this app, download the database here.

​
🌊
Create a workflow

​Log in to Flow studio, and create a new workflow:
Click on File and choose New.

​
πŸ‘£
First step

  1. 1.
    Create the first step by right-clicking on the green start step and choose Add sequence arrow.
  2. 2.
    Right-click again and select Create user step.
  3. 3.
    Enter a suitable name for the user step label.
  4. 4.
    Double-click on the user step to enter the user step editor.
  1. 1.
    Drag a Header object into the center of the user step editor.
  2. 2.
    Enter a text in the header, e.g. Welcome.
  3. 3.
    Drag in a Text input field.
  4. 4.
    Enter a prompt text, e.g. Enter name.
  5. 5.
    Enter a target variable, e.g. Name.
  6. 6.
    Drag in another Text input field and enter a prompt and a target value for the email address.
  7. 7.
    Click OK to save your changes.
Tips: Use the test bench to verify what you have done.
Start the test bench by clicking on the play button in the right corner or use the keyboard shortcut Ctrl+Enter.

​
πŸ“‘
Get data

  1. 1.
    Right-click and choose Create machine step.
  2. 2.
    Right-click on the machine step and select Add data arrow, connect the data arrow with the User step.
  3. 3.
    Double-click on the machine step to open the machine step editor.
  4. 4.
    Select connector in the drop-down list.
  5. 5.
    Select database call type and enter the query.
  6. 6.
    Enter a variable name, e.g. DS_issueTypes.
  7. 7.
    Click OK to save your changes.
Tip: Use the magic wand to beautify the SQL script in the machine step.
πŸ§™β™‚

Code to use:

1
SELECT [TYPE] "TYPE"
2
FROM [dbo].[IssueType]
Copied!
Open the User step and configure a list to show the issue types.
  1. 1.
    Drag in a Menu selection input.
  2. 2.
    Enter a target variable for the output, e.g. issueType.
  3. 3.
    Select table variable DS_issueTypes as the data source.
  4. 4.
    Enter a prompt, e.g. Select issue type.
  5. 5.
    Enter row text, type a { to get a list of available variables, choose the TYPE variable.
  6. 6.
    Choose TYPE as Field to select, and select Show empty option.
  7. 7.
    Drag in a Text input field.
  8. 8.
    Enter a prompt text, e.g. Enter issue description.
  9. 9.
    Enter a target variable, e.g. issueDesc.
  10. 10.
    Select multiline.
  11. 11.
    Click OK to save your changes.
Tips: Use the test bench to verify what you have done.
Start the test bench by clicking on the play button in the right corner or use the keyboard shortcut Ctrl+Enter.

​
🌱
Use variables

  1. 1.
    Add another machine step, you can drag and drop a machine step from the Workflow elements area or right-click in the workflow area and select Create machine step.
  2. 2.
    Use a sequence arrow and connect the first user step with the machine step you just added.
  3. 3.
    Double-click on the machine step to enter the machine step editor.
  4. 4.
    Select connector in the drop-down list. The database call type should be set to script.
  5. 5.
    Enter your SQL script, enter a { to get a list of available variables, choose the name variable, do the same for the other variables.
  6. 6.
    Click OK to save your changes.
Tip: Write @out_ to create an output variable for scripts. You can add several @out_ to add more values to the output record.

Code to use:

1
INSERT INTO [WorkOrder]
2
([NAME]
3
,[EMAIL]
4
,[ISSUE_TYPE]
5
,[ISSUE_DESC]
6
,[REPORT_DATE]
7
,[STATUS])
8
VALUES
9
(@name
10
,@email
11
,@issueType
12
,@issueDesc
13
,GETDATE()
14
,'New')
15
​
16
​
17
SET @out_issueNumber = SCOPE_IDENTITY()
Copied!
Add another user step, add one Header and one Static text field with information about the issue number. Enter a { to get a list of available variables, choose the issueNumber variable.
Tip: Click on the wrench icon
πŸ”§
(Route 1) to change the button name to a more suitable name so the user understands what will happen when clicking on the button.

​
🀝
Commit and publish

An app must be published to be available in the Flow clients.
  1. 1.
    Commit the app by clicking on the check mark in the top left corner of the workflow area.
  2. 2.
    Leave a comment that describes the change that was made, and click on Commit.
  3. 3.
    Finally, publish the workflow by clicking on the (space ship) Publish button.
For each commit a version will be created, all versions will be listed in the Version history panel. Open an old version by double-clicking on a version in the Version history panel.

​
πŸ’Ό
Add to menu

  1. 1.
    Create a menu, right-click in the server content area and choose New -> Menu.
  2. 2.
    Enter a Title for the menu.
  3. 3.
    Click on the + and choose Workflow item, select your workflow.
  4. 4.
    Click on Edit roles in the bottom corner of the menu and check the roles that should have permission to the menu. Learn how to set up a role here.
The app is now ready to run in any Flow client.

​
🎠
Run the app

You can run all apps in the Flow clients on iOS, Android, Windows 10, and Web. You can download the Flow client app from Google store, App Store and Microsoft store.
  1. 1.
    Open the Flow client app, connect to your Flow server and enter your username and password.
  2. 2.
    When you are logged in, you will see the app under the menu tab, click on the app to start.
  3. 3.
    Fill in the fields and click OK, cancel the execution by clicking the Quit button.
Tip: If your app doesn't appear in the client, check that the menu and user are assigned to the correct role.
​