# Snippet - Arguments, Variables, Dynamic Values & Sourced Values

The Snippet – Arguments, Variables, Dynamic Values & Sourced Values project demonstrates how to define arguments, variables, dynamic values and shows how to use appRules Sourced Values to set these values.

## Arguments

Arguments are defined in the Arguments tab of the Project Details form as show below.      &#x20;

{% hint style="info" %}
Note that the values shown are defaults.  They can be changed by passing different values when you run the project.
{% endhint %}

<figure><img src="/files/EONBQjz4d7iCAGDcD4l2" alt=""><figcaption></figcaption></figure>

## Variables

&#x20;Variables are defined in the Variables tab of the Project Details form as show below.

<figure><img src="/files/ZuvqnQAbgFG6opvbkeFI" alt=""><figcaption></figcaption></figure>

## Dynamic Values

Dynamic Values are not pre-defined. They are created automatically the first time they are used in the project.

## Sourced Values

Sourced Values are used when getting and setting values in appRules.  appRules includes several built-in value sources and editors are displayed at design time based on the Source(type) of the data.  In this sample project, you will explore several editors displayed when setting the values.

**The Sample Project:**

<figure><img src="/files/ZnxRZvmvKNVUjHsI8ZiM" alt=""><figcaption></figcaption></figure>

Two activities are used in this project to set and display values.

## **SetValues Activity**

This activity from the Base module is used for setting the values.

The Values property is a collection for setting values.

&#x20;

The following is the Sourced Value editor for setting the value:

<figure><img src="/files/Y7elUj50YkBUqMSpYLy6" alt=""><figcaption></figcaption></figure>

The following is the selection of the Sourced Value that sets the new value:

<figure><img src="/files/Qdv23Z4jIZtN3ENhb4YJ" alt=""><figcaption></figcaption></figure>

## **ViewRuntimeValues Activity**

This activity from the Dialogs module is used to display the values. When the project is run, the following form is displayed:

<figure><img src="/files/Da82j58UW9EyZDZZTqjY" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/snippets/snippet-arguments-variables-dynamic-values-and-sourced-values.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
