Stanley Bezhanski Posted April 27, 2009 Share Posted April 27, 2009 Hello, everybody I'm new to the forum and I have one case, which I could solve. I will try to explain it as much as I can. I want to create a relationship between Post Codes, Wight and Rates. My idea is - when I enter a Post Code and Weight - the rate automatically to show up. So I create additional table with all zips codes and rates. For my rate quote field, I checked "Calculated Value" and following formula as Case Case ( Max ( WEIGHT;DIM_WEIGHT) <= "100"; rateszips 2::onehunlbs; Max ( WEIGHT;DIM_WEIGHT) > "1000";rateszips 2::onethoulbs; Max ( WEIGHT;DIM_WEIGHT) > "2000";rateszips 2::twothoulbs; Max ( WEIGHT;DIM_WEIGHT) > "3000";rateszips 2::threethoulbs;Max ( WEIGHT;DIM_WEIGHT) > "5000";rateszips 2::fivethoulbs;) I want every number between 0 and 100 in max of "Weigh" or "Dim_weight" with combination of zip code to look for "onehunlbs" field on my Zips table. It shows the the right rate if I enter a number in the range of 0 and 100, but if I enter a number above 1000 .. it doesn't change the rate. What could be the problem. Is it something wrong with my formula ? Any Ideas ? Thanks in advance! Link to comment Share on other sites More sharing options...
comment Posted April 27, 2009 Share Posted April 27, 2009 I would create a separate record for each rate (with fields for PostCode, FromWeight and Rate), then lookup the rate using a relationship defined as: YourTable::PostCode = Rates::PostCode AND YourTable::Weight ≥ Rates::FromWeight with Rate records sorted by FromWeight, descending. Link to comment Share on other sites More sharing options...
Stanley Bezhanski Posted April 30, 2009 Author Share Posted April 30, 2009 Thanks for the advice! Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5468 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 accountSign in
Already have an account? Sign in here.
Sign In Now