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

Calc Field, 3 repetitions, doesn't work?

Featured Replies

Here's what I have:

Field Named: sbtDocs

Field has 3 repetitions

Calculation result is a Container

There are 3 blocks on my Layout that show repetitions 1-3.

For the field calcuation I have:


If(

not IsEmpty(orders::sbtSONO);



Case(

Get(CalculationRepetitionNumber) = 1; "filewin://srs3/Order Documents/SBT/" & Trim(orders::sbtSONO) & "C.pdf";

Get(CalculationRepetitionNumber) = 2; "filewin://srs3/Order Documents/SBT/" & Trim(orders::sbtSONO) & "I.pdf";

Get(CalculationRepetitionNumber) = 3; "filewin://srs3/Order Documents/SBT/" & Trim(orders::sbtSONO) & "P.pdf";

)



;

""

)

What I'm trying to do is check to make sure the order has an SBT Number before anything else. If it does I want to populate the 3 blocks with different filepaths to 3 different pdf files. They all share the same path except the letter before the extension.

It will display the first repetition correctly, but the remaining 2 repetitions are left blank. Like it's not calculating them.

What have I done wrong?

  • Author


If(

not IsEmpty(orders::sbtSONO);



"filewin://srs3/Order Documents/SBT/" & Trim(orders::sbtSONO)

&

Case(

Get(CalculationRepetitionNumber) = 1; "C.pdf";

Get(CalculationRepetitionNumber) = 2; "I.pdf";

Get(CalculationRepetitionNumber) = 3; "P.pdf";

)



;

""

)

Another flavor, but it still doesn't work. Weird thing is if I put "Get(CalculationRepetitionNumber)" in the else statement it will print out the Rep# in the 2nd and 3rd block? Why can't the 2nd and 3rd rep pass the If statement?

You need to enclose any reference to a non-repeating field (orders::sbtSONO, in your example) within the Extend() function.

  • Author

That worked! Thanks alot!!

Is there any way for filemaker to check to see if the file exists before linking it?

Not really:

http://www.fmforums.com/forum/showtopic.php?tid/183503/

Anyway, what would be the point?

  • Author

That plug-in did the trick. Thanks again!

  • Author

The point was to keep bogus shortcuts from being created on my forms. Otherwise filemaker would blindly create 3 links to files that might not exist.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.