January 14, 200818 yr 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?
January 14, 200818 yr 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?
January 14, 200818 yr You need to enclose any reference to a non-repeating field (orders::sbtSONO, in your example) within the Extend() function.
January 14, 200818 yr Author That worked! Thanks alot!! Is there any way for filemaker to check to see if the file exists before linking it?
January 14, 200818 yr Not really: http://www.fmforums.com/forum/showtopic.php?tid/183503/ Anyway, what would be the point?
January 14, 200818 yr 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