# Difference between revisions of "Advanced Ratings: Using Formulae"

(→See Also:) |
|||

(10 intermediate revisions by 3 users not shown) | |||

Line 1: | Line 1: | ||

− | If you wish to make your ratings more dynamic then it's OK to use formulae in your rating files. | + | ==Introduction== |

+ | |||

+ | ''This area of SchemeServe is more complex than most others. In order for you to make the most out of using our Help Guide for developing your own rates, it would be best if you read all the parts of this guide in order. To help you with this they are listed in numerical order in the “See Also” section of each page. You can click on a link to take you to section 1 and then move through logically at your own pace.'' | ||

+ | |||

+ | ==Using Formulae== | ||

+ | |||

+ | If you wish to make your ratings more dynamic then it's OK to use formulae in your rating files. You can develop formulae using these toolsets [[Mathematical Helper Functions for Ratings Files|Mathematical Operations]], [[Advanced Ratings: Conditional Statements and Functions|Conditional Statements and Functions]] and [[Advanced Ratings: Rounding Values|Rounding Values for Formulae]]. | ||

+ | |||

''We've provided a couple of example formulae here:'' | ''We've provided a couple of example formulae here:'' | ||

+ | |||

Line 8: | Line 16: | ||

This formula changes the rating for Q4_Cover based on a positive answer to Q3 and the results of the Formula | This formula changes the rating for Q4_Cover based on a positive answer to Q3 and the results of the Formula | ||

+ | |||

Line 13: | Line 22: | ||

This formula calculates the number of days between any two given dates. | This formula calculates the number of days between any two given dates. | ||

+ | |||

+ | ==Using IF Statements within Rating== | ||

+ | |||

+ | IF([Question1_Value]='Yes','1000','10') | ||

+ | |||

+ | |||

+ | '''Using OR''' | ||

+ | |||

+ | IF([Question1_Value]='Yes' OR [Question2_Value]='Yes','1000','10') | ||

+ | |||

+ | |||

+ | '''Using AND''' | ||

+ | |||

+ | IF([Question1_Value]='Yes' AND [Question2_Value]='Yes','1000','10') | ||

+ | |||

+ | |||

You can use any of the [[Advanced Ratings: Conditional Statements and Functions|conditional statements and functions]] in a formula and it's important to pay attention to [[Advanced Ratings: Rounding Values|rounding values]] too. | You can use any of the [[Advanced Ratings: Conditional Statements and Functions|conditional statements and functions]] in a formula and it's important to pay attention to [[Advanced Ratings: Rounding Values|rounding values]] too. | ||

+ | |||

+ | ==_Value _Cover _Rate and _Result== | ||

+ | |||

+ | When you don't use a suffix we have to first see if we can convert the value into a number then return a number if we can and text if we can't. | ||

+ | This means that it can change from a number to text depending on what the user puts into the answer. | ||

+ | When you use that in a formula the type can change and you end up telling the formula to do things like "abc" * 123 | ||

+ | Which causes random errors in the formulas depending on what the answers are. | ||

+ | |||

+ | So, in short, if you don't want random formula errors ALWAYS use a suffix so we know what you want. | ||

== See Also: == | == See Also: == | ||

Line 25: | Line 59: | ||

#[[Downloading SchemeServe Rating Files]] | #[[Downloading SchemeServe Rating Files]] | ||

#[[Flat Rating: Building Your First SchemeServe Rating File]] | #[[Flat Rating: Building Your First SchemeServe Rating File]] | ||

+ | #[[Conditions for Rating Files]] | ||

+ | #[[Actions for Rating Files]] | ||

#[[Rating Modifiers: What they are and when to use them]] | #[[Rating Modifiers: What they are and when to use them]] | ||

#[[Multi-Step Ratings: Using Multiple Sections in Rating Files]] | #[[Multi-Step Ratings: Using Multiple Sections in Rating Files]] | ||

Line 32: | Line 68: | ||

#[[Master Rating: Using Tables and Row Lookup Loops]] | #[[Master Rating: Using Tables and Row Lookup Loops]] | ||

#[[Example Ratings for Specific Insurance Types (Life and Public Liability)]] | #[[Example Ratings for Specific Insurance Types (Life and Public Liability)]] | ||

− | |||

− | |||

#[[Mathematical Helper Functions for Ratings Files]] | #[[Mathematical Helper Functions for Ratings Files]] | ||

#[[Rating Agents: Tips and Tricks]] | #[[Rating Agents: Tips and Tricks]] |

## Latest revision as of 07:21, 22 November 2018

## Contents

## Introduction

*This area of SchemeServe is more complex than most others. In order for you to make the most out of using our Help Guide for developing your own rates, it would be best if you read all the parts of this guide in order. To help you with this they are listed in numerical order in the “See Also” section of each page. You can click on a link to take you to section 1 and then move through logically at your own pace.*

## Using Formulae

If you wish to make your ratings more dynamic then it's OK to use formulae in your rating files. You can develop formulae using these toolsets Mathematical Operations, Conditional Statements and Functions and Rounding Values for Formulae.

*We've provided a couple of example formulae here:*

Answer:Q3, Formula:[Q1_Cover]+[Q2_Cover], SetCover:Q4 Yes, 1000-999999, [Q4_Cover]*0.2

This formula changes the rating for Q4_Cover based on a positive answer to Q3 and the results of the Formula

SetCover:Days ([DateEnd_DateValue]-[DateStart_DateValue]).Days

This formula calculates the number of days between any two given dates.

## Using IF Statements within Rating

IF([Question1_Value]='Yes','1000','10')

**Using OR**

IF([Question1_Value]='Yes' OR [Question2_Value]='Yes','1000','10')

**Using AND**

IF([Question1_Value]='Yes' AND [Question2_Value]='Yes','1000','10')

You can use any of the conditional statements and functions in a formula and it's important to pay attention to rounding values too.

## _Value _Cover _Rate and _Result

When you don't use a suffix we have to first see if we can convert the value into a number then return a number if we can and text if we can't. This means that it can change from a number to text depending on what the user puts into the answer. When you use that in a formula the type can change and you end up telling the formula to do things like "abc" * 123 Which causes random errors in the formulas depending on what the answers are.

So, in short, if you don't want random formula errors ALWAYS use a suffix so we know what you want.

## See Also:

- Introduction to Rates in SchemeServe
- Uploading SchemeServe Rating Files
- Downloading SchemeServe Rating Files
- Flat Rating: Building Your First SchemeServe Rating File
- Conditions for Rating Files
- Actions for Rating Files
- Rating Modifiers: What they are and when to use them
- Multi-Step Ratings: Using Multiple Sections in Rating Files
- Advanced Ratings: Using Formulae
- Advanced Ratings: Conditional Statements and Functions
- Advanced Ratings: Rounding Values
- Master Rating: Using Tables and Row Lookup Loops
- Example Ratings for Specific Insurance Types (Life and Public Liability)
- Mathematical Helper Functions for Ratings Files
- Rating Agents: Tips and Tricks