0% found this document useful (0 votes)
25 views

RF - Lesson 5 Exercise - Variables

Uploaded by

victormartin427
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

RF - Lesson 5 Exercise - Variables

Uploaded by

victormartin427
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Expressions: Transform Your Data

Exercise to Accompany
Variables

Lesson 5 Exercise

© Appian Corporation, 2021


Introduction 2

Exercise Environment 2

Save Often 2

Additional Resources 2

1 – Configure and Test a Rule Input 3

2 – Answer Key 4

3 – Configure and Test a Local Variable 4

4 – Answer Key 5

5 – Challenge Scenario 5

6 – Answer Key 6

Notice of Rights

This document was created by Appian Corporation, 7950 Jones Branch Dr, Tysons, Virginia 22102.
Copyright 2021 by Appian Corporation. All rights reserved. Information in this document is subject to
change. No part of this document may be reproduced or transmitted in any form by any means, without
prior written permission of Appian Corporation. For more information on obtaining permission for reprints
or excerpts, contact Appian Training at [email protected].

Appian Expressions: Transform Your Data Course Exercise Page 1


© Appian Corporation, 2021
Introduction
This exercise offers you the opportunity to practice the skills you just learned in the previous
lesson.

Exercise Environment
Complete the exercises in this course using an Appian Community Edition environment. You
should have obtained one earlier to complete exercises in the previous courses in this learning
path. If you do not have an Appican Community Edition environment, get started by visiting:
https://community.appian.com/p/my-learning-journey.

In this exercise, you will practice writing expression rules, and save them in a practice folder
created in the AX application. These are practice exercises that are separate from the remainder
of your AX application. If you are working on these exercises independently and do not have the
AX application, create an application first before proceeding. Review the Create an Application:
First Steps course for instructions on creating an application.

Save Often
Appian does not automatically save updates, so save your objects frequently.

Additional Resources
Appian provides a plethora of training resources for novice Appian developers. The following
resources are particularly popular with our learners:

● Academy Online - Appian’s online courses provide useful survey courses, step-by-step
tutorials, and some additional practice exercises. Explore these resources at your own
pace. Survey courses will help you with developing a better grasp of the range of topics
you need to learn about. Video and print tutorials will help you with getting hands-on
experience with Appian.
● Appian Documentation - Appian’s product documentation will provide you with the
overview of key Appian features, newest release information, additional tutorials, and
helpful patterns and recipes to implement in your app.
● Community Discussions for New Users - Join our community of experts to ask questions
and find answers from past discussions.

Appian Expressions: Transform Your Data Course Exercise Page 2


© Appian Corporation, 2021
1 – Configure and Test a Rule Input
In this exercise, you’ll write an expression that uses a rule input and test it to verify the output.

1. Log into your Appian Community Edition environment, and select the Acme Exercise
application.

2. Create an expression rule object named AX_L5Ex1. Add the description, “Practice for
Lesson 5,” and store it in the AX Expressions Practice folder.

3. Read the following scenario:

Acme Auto HQ loans out vehicles to its branches. When each vehicle is returned, the
mileage needs to be compared to the starting mileage.

● If the difference exceeds 50,000 miles, then the message “Run full diagnostics”
should be displayed.
● Otherwise, the message “Return to inventory” should be displayed.
● Assume that every loaned vehicle was used, so the incoming mileage should be
greater than the outgoing mileage.

4. Write an If() statement that will perform what is needed in the scenario.

Hint: Create rule inputs for the two mileage values.

Refer to the Appian Docs All Functions page for more information.

5. Enter values, and click Test Rule to verify your test output meets the scenario
requirements.

6. Save changes.

Appian Expressions: Transform Your Data Course Exercise Page 3


© Appian Corporation, 2021
2 – Answer Key
The correct expression is shown in the following screenshot. Your rule input names may be
different.

3 – Configure and Test a Local Variable


Next, you’ll create and configure a local variable.

1. Create a rule expression object named AX_L5Ex2, and add the description, “Practice
for Lesson 5.” Store it in the AX Expressions Practice folder.

2. Create two number (integer) rule inputs named first and second.

3. Create a local variable named sum to store the sum of first and second.

4. Complete the expression so it returns the string “The new total is “ and the value of
the local variable.

5. Save your changes.

Appian Expressions: Transform Your Data Course Exercise Page 4


© Appian Corporation, 2021
4 – Answer Key
The correct expression is shown in the following screenshot.

5 – Challenge Scenario
Ready to try writing an expression using the isnull() function?

1. Create an expression rule object named AX_L5Challenge, and add a description,


“Challenge Practice for Lesson 5.” Save it in the AX Expressions Practice folder.

2. Write an expression that tests a rule input value. If it is null, then the message “Null
value” should be displayed. Otherwise, the rule input value should be displayed.

3. Test the expression, first with a null value and then with an actual value.

4. Save changes.

Appian Expressions: Transform Your Data Course Exercise Page 5


© Appian Corporation, 2021
6 – Answer Key
The correct expression is shown in the following screenshot:

Appian Expressions: Transform Your Data Course Exercise Page 6


© Appian Corporation, 2021

You might also like