Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

calculation function on a value list

Featured Replies

  • 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?

Is Fee a repeating field with one "fee" per Tour entry?

-bd

Post your calculation and we'll see what the problem is.

  • 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)

  • 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.

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... )

  • Author
  • Newbies

ok i'll chew on that one. i'm limping along on fmp 3.

thanks Q

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.