This sample snippet project demonstrates how to use a function from the appRules Financial library.
The appRules Financial Library includes Microsoft Excel compatible financial functions that are accessible from the appRules Actions Editor.
This sample project uses the ACCRINT financial function which returns the accrued interest for a security that pays periodic interest.
Below is the definition of the function to be used in the PerformAction activity. It includes the configuration of the properties required for calculating the accrued interest.
For this sample, the Calculate Accrued Interest action is then used in the Perform Action activity as shown below. Note that the action can also be used in other objects or as part of other actions, conditions, queries, etc.
Note that the activity has been configured to display the result at runtime.
When this project is run, the result is displayed as shown below:
This snippet sample project demonstrates how to configure composite keys for updating and deleting records.
The sample uses a simple example for deleting a record from a SQL Customers table using multiple fields that make up the composite key. The process is the same for modifying a record using composite keys.
Activities:
InitializeTarget This activity initializes the Target activity that will be used for the deletion.
DeleteRecord This activity is used for performing the actual record deletion.
Edit the DeleteRecord activity:
Then click on the Option property:
Select Composite Key as the key type and configure the collection of composite keys:
The Snippet - Infinite Loop project demonstrates how to create an infinite loop project in appRules using the While activity and the Delay activity.
1. PerformAction Activity
The PerformAction activity is used to set the last LastResult to True to enable the While activity condition.
2. While Activity
The While activity has been configured to loop endlessly by setting the Condition to āLast Result is Trueā
3. Delay Activity
The Delay activity has been configured to simply delay execution and then continue.
This project has been pre-configured to run in the background. If you run it interactively, it will tie up your session.
Use the appRules Job Monitor to terminate the job.
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 are defined in the Arguments tab of the Project Details form as show below.
Note that the values shown are defaults. They can be changed by passing different values when you run the project.
Variables are defined in the Variables tab of the Project Details form as show below.
Dynamic Values are not pre-defined. They are created automatically the first time they are used in the project.
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:
Two activities are used in this project to set and display values.
This activity from the Base module is used for setting the values.
The Values property is a collection for setting values.
The following is the Sourced Value editor for setting the value:
The following is the selection of the Sourced Value that sets the new value:
This activity from the Dialogs module is used to display the values. When the project is run, the following form is displayed:
This snippet sample project demonstrates how to configure appRules Actions to generate and maintain counters and running totals without using scripts or code.
The project uses a single ViewRuntimeValues activity accessing actions and conditions that have been defined for the demonstration.
9 Actions have been defined in the project:
2 Conditions have been defined in the project:
17 Entries have been added in the ViewRuntimeValues activity used in the project:
When the project is run the results are shown as follows: