Jump to content
Server Maintenance This Week. ×

How to do a lookup on a portal for a calculation


This topic is 7266 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello everyone...

ok here it goes...

For this example I have two tables..."Policies" and "Premiums"

On the Policies table I have a Fields called "Escrow Amount" and "Escrow Factor"

On the Premium table (Viewed and enterd through a portal on the Policies Table) I have row numbers which will be years (1,2,3,4...etc.) and Amounts for each of the years..

What I need is help comming up with an equation that can calculate Escrow Amount:

Take the escrow factor (1.25) and multiply it by a Number (will be a field) Lets say the value is 6 so the answer will be 7.5

Now I need an equation that can look up on the premium list that I have entered...Look up year 7 (which will be row 7) and then take .5 of the next year wich in this case will be year 8 and add both numbers together...

Sounds easy..but I have no Idea how to do a lookup by years and return an amount...

Help

Joseph

Link to comment
Share on other sites

How do I tell it to take a number lets say 5.6...break it down so it looks up year 5 and does a calculation then it looks up year 6 (b/c the number was bigger that 5) and does a calculation on the number next to 6..?

Link to comment
Share on other sites

I am not sure I understand...int(5.6)=5 so now I have the number how do I make a script that can look that number up on my premium table and pull off the coresponding value?

Example:

Year Premium

1 200

2 300

3 350

4 350

How do I pull off the value off of the number?

Joseph

Link to comment
Share on other sites

Int(x) = integer portion of x.

Mod(x, y) = remainder of x/y.

You can use a global to year relationship. Set the global with the Int result, Commit Record, then set the appropriate amount with the related Premium. Do the same with Int + 1.

Link to comment
Share on other sites

This topic is 7266 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.