Difference between revisions of "Advanced Ratings: Using Formulae"

From SchemeServe Help
Jump to: navigation, search
(Using Formulae)
 
(One intermediate revision by one other user not shown)
Line 41: Line 41:
  
 
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: ==

Latest revision as of 12:21, 22 November 2018

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:

  1. Introduction to Rates in SchemeServe
  2. Uploading SchemeServe Rating Files
  3. Downloading SchemeServe Rating Files
  4. Flat Rating: Building Your First SchemeServe Rating File
  5. Conditions for Rating Files
  6. Actions for Rating Files
  7. Rating Modifiers: What they are and when to use them
  8. Multi-Step Ratings: Using Multiple Sections in Rating Files
  9. Advanced Ratings: Using Formulae
  10. Advanced Ratings: Conditional Statements and Functions
  11. Advanced Ratings: Rounding Values
  12. Master Rating: Using Tables and Row Lookup Loops
  13. Example Ratings for Specific Insurance Types (Life and Public Liability)
  14. Mathematical Helper Functions for Ratings Files
  15. Rating Agents: Tips and Tricks