Newbies sunnycove Posted September 29, 2004 Newbies Posted September 29, 2004 I have a field with 8 repeating text values called "Tour" (types of kayaking trips). I want to establish a script or calculation in the "Fee" field (city port fee) that queries the "Tour" field and returns a value in the "Fee" field based on whether the type of kayak trip listed/repeated in the "Tour" field uses a motor boat or not. If yes motor boat, then fee; if no motor boat, then no fee. What seems to be failing is the repeating nature of the "Tour" field - niether script nor calculation recognizes the repeated values as a field. Any advice to my friends ou there?
LiveOak Posted September 29, 2004 Posted September 29, 2004 Is Fee a repeating field with one "fee" per Tour entry? -bd
-Queue- Posted September 29, 2004 Posted September 29, 2004 Post your calculation and we'll see what the problem is.
Newbies sunnycove Posted September 29, 2004 Author Newbies Posted September 29, 2004 Fee isn't a repeating value. It's either $1.50 or $0.0 (its a city tax per person on a motor boat using the harbor)
Newbies sunnycove Posted September 29, 2004 Author Newbies Posted September 29, 2004 Here's the calculation for the "Fee" field: Case(Tour= "Fox Island AM" or "Fox Island PM" or "Thumb Cove Day" or "Thumb Cove Overnight" or "Aialik Bay Exploration" or "Fox Island Escape" or "Northwestern Fjord Exploration", 1.5*# of Clients,"") All the tours listed within " " in the "Fee" calculation are tours that require a city port fee of $1.50. Within the"Tours" field, there are other tours listed as repeating values not included in the "Fee" calculation that do not require the port fee.
-Queue- Posted September 29, 2004 Posted September 29, 2004 First of all, you need a specific test for each Tour possibility, e.g. Case( Tour = "Fox Island AM" or Tour = "Fox Island PM" or Tour = "Thumb Cove Day", etc. ) or a combination of the tests, e.g. Case( PatternCount( "Fox Island AMFox Island PMThumb Cove Day...", Tour )... ). Secondly, if you want to reference all the values in the repetitions in a non-repeating field, you need to use GetRepetition( field, repetition ), e.g. Case( PatternCount( "Fox Island AMFox Island PMThumb Cove Day...", Tour ) or PatternCount( "Fox Island AMFox Island PMThumb Cove Day...", GetRepetition( Tour, 2 ) ) or PatternCount( "Fox Island AMFox Island PMThumb Cove Day...", GetRepetition( Tour, 3 ) ), etc... )
Newbies sunnycove Posted October 2, 2004 Author Newbies Posted October 2, 2004 ok i'll chew on that one. i'm limping along on fmp 3. thanks Q
Recommended Posts
This topic is 7359 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