> 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.

## 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.

{% 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 in a dialog.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
