September 29, 200421 yr Newbies 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?
September 29, 200421 yr Author Newbies 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)
September 29, 200421 yr Author Newbies 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.
September 29, 200421 yr 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... )
Create an account or sign in to comment