> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/snippets/snippet-executing-financial-functions.md).

# Snippet - Executing Financial Functions

This sample snippet project demonstrates how to use a function from the appRules Financial library.&#x20;

## The appRules Financial Library

&#x20;[The appRules Financial Library](/apprules-r-documentation/platform/platform-features/actions/action-categories/actions-fields-library-financial.md) includes Microsoft Excel compatible financial functions that are accessible from the appRules Actions Editor. &#x20;

This sample project uses the ACCRINT financial function which returns the accrued interest for a security that pays periodic interest.

## Financial Function Action

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.

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

## PerformAction Activity

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.

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

<figure><img src="/files/8Irj9E1P15atrK88TMMZ" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note that the activity has been configured to display the result at runtime.
{% endhint %}

When this project is run, the result is displayed as shown below:

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/snippets/snippet-executing-financial-functions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
