Lompat ke konten

Pelajaran 20 ยท Macros and Apps

Analytic Apps and Interface Tools

Turn a workflow into an Alteryx analytic app with interface tools, validate user input, handle errors clearly and design a form that non-experts can use.

Colleagues often need your result but do not know Designer. An analytic app wraps a workflow in a simple form: users choose values such as a date range or a region, press run and receive the output. The workflow logic stays the same; only the settings change.

Apps are saved as .yxwz files.

Building blocks

Interface tools create the form controls. Common ones:

Tool User sees
Text Box A text field
Drop Down A single choice from a list
List Box One or more choices
Check Box, Radio Button Switches and options
Date A date picker
Numeric Up Down A number with limits
File Browse, Folder Browse File or folder selection

Each control sends its value to an Action tool, which changes a setting in the workflow, just as in standard macros. You can also pre-fill choices with values from data, such as a list of regions.

To make an app, add interface tools, connect them, change the workflow type to Analytic App in the workflow configuration and save. The interface designer lets you arrange the controls, label them and group them.

Running apps for other people usually needs a shared platform such as Alteryx Server or a cloud service, and what is available depends on your license. Confirm the options with your administrator.

Validating input

Never trust input. A user may leave a field empty, type letters into a number field or choose an end date before the start date. Two tools help:

  • Error Message: shows a custom message and stops the run when a condition fails.
  • Controls with limits: a Numeric Up Down with a minimum and maximum, or a Drop Down instead of a free-text field.

Prefer a drop-down list to free text whenever the valid values are known.

Python Stand-in: validate the form before running

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Good error messages say what is wrong and how to fix it.

Dates and values in queries

A date control often feeds a filter such as:

TEXT
[order_date] >= "2026-03-01" AND [order_date] <= "2026-03-31"

The Action tool replaces the date text with the chosen values. Check that the filter works when the start and end are the same day, and when your data has times (a time part may exclude the last day if you compare with midnight).

When a text value goes into a database query, follow the caution from database connections: restrict values to an allowed list.

Testing the app

Designer lets you run the app interface as a user would see it. Test:

  1. Normal values.
  2. Empty and extreme values.
  3. A selection that returns no rows. Show a helpful message instead of an empty or broken report.
  4. Output files: where they are saved and who can open them.
Python Stand-in: a friendly message for empty results

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Chaining apps

For multi-step forms, such as "choose a country, then choose a city in it", one app can lead to another (often called chained apps). A first app writes the information that the second needs. Chaining adds complexity, so use it only when one form cannot do the job.

Designing a good form

  • Use clear labels in plain language, with units and examples.
  • Set sensible defaults.
  • Keep the number of choices small.
  • Group related controls.
  • Explain what the output is and how long it usually takes.

Also think about permissions. A form makes it easy to run a query, so make sure users cannot use it to see data they should not have. Filtering inside the form is not security by itself; the underlying connection should enforce access rules.

Do not let an app trigger a destructive action, such as overwriting a table, without a confirmation step, a clear warning and restricted access.

From workflow to app, step by step

Start with a workflow that already runs correctly with fixed values. Then:

  1. List the values that users should change. Leave everything else fixed.
  2. For each value, choose the control that allows the fewest mistakes.
  3. Connect the control to an Action tool and the Action tool to the target setting.
  4. Run the app with the same values as the fixed workflow and compare the results. They should be identical.
  5. Change one value at a time and confirm that the output changes as expected.

Step 4 is easy to skip and very valuable. If the app and the fixed workflow disagree, check which text or setting the Action tool replaces. Finding this before users do keeps their trust in the app.

Practice task

Design an app on paper for a "sales by region" report. The user picks a region, a start date and an end date. For each control, write down which interface tool you would use, its default value, the rule that makes a value valid and the message shown when it is not. Then write what the Action tool changes in the workflow.

Finally, list four test cases: a normal selection, a start date equal to the end date, a reversed date range and a region with no sales. State the expected behavior for each one before you build. If you have Designer, build the app and run all four. Ask a colleague who has not seen the workflow to use the form, and note every point where they hesitate. Each hesitation is a label or default that you can improve.

Common mistakes

  • Free-text fields where a list would prevent typos.
  • Forgetting to connect the Action tool, so the form changes nothing.
  • Testing only with the happy path.
  • Saving outputs to a path that other users cannot reach.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which extension do analytic apps use?

    Analytic apps are saved as yxwz files.
  2. 2. What makes a Drop Down safer than a Text Box for a region?

    A fixed list prevents typos and unexpected values.
  3. 3. Which tool can stop a run with a custom message when input is invalid?

    Error Message checks a condition and reports a clear problem.
  4. 4. A user's selection returns no rows. What is the best behavior?

    Empty results need an explanation, not silent or surprising output.

Summary

  • Analytic apps put a form in front of a workflow and are saved as .yxwz.
  • Interface tools send values through Action tools.
  • Validate input, handle empty results and test the whole form.
  • Apply real access control in the data source, not only in the form.

Next: Testing and Debugging Workflows

Progres Anda disimpan di browser ini. Tidak perlu akun.