troubleshooting Question

aggregate several steps in a calculation

Avatar of João serras-pereira
João serras-pereiraFlag for Portugal asked on
FileMaker Pro
7 Comments1 Solution113 ViewsLast Modified:
Hi

I have a calculation field that, needs to parse another field.

Currently it runs like this:

I
f ( Middle(mimg_FileName;10;3)="Q9 " ; 
      "documento de identificação frente"  ;
      Case 
      ( 
         Middle(mimg_FileName;14;7) = "FotoMil" ; 
            "fotografia de militante";  
         Middle(mimg_FileName;14;9) = "AssinaMil" ; 
            "assinatura de militante";  
         Middle(mimg_FileName;14;7) = "Canhoto" ; 
            "canhoto";  
         Middle(mimg_FileName;14;12) = "AssinaTestem" ; 
            "assinatura de testemunha";  
         Middle(mimg_FileName;14;10) = "AssinaResp" ; 
            "assinatura de testemunha";  
         Middle(mimg_FileName;10;3) = "Q11" ; 
            "documento de identificação frente";  
         Middle(mimg_FileName;14;11) = "AssinatResp" ; 
            "assinatura de responsável";  
       "--" 
       ) 
   )

Open in new window


Now In need to improve it and make it a bit more complex. The problem I have is that, depending on having previously identified a "Q9", Q10 has 2 meanings, "A" or "B", so the calculation should run like this:

$$type = "" 
if ( Middle(mimg_FileName;10;3)="Q9 " ; 
      ["documento de identificação frente" ;  let $$type =("A")];
      Case 
       ( 
         $$type= "A";
          if (Middle(mimg_FileName;10;3) = "Q10" ;   "documento de identificação frente";  
[indent]    Case 
      ( 
         Middle(mimg_FileName;14;7) = "FotoMil" ; 
            "fotografia de militante";  
         Middle(mimg_FileName;14;9) = "AssinaMil" ; 
            "assinatura de militante";  
         Middle(mimg_FileName;14;7) = "Canhoto" ; 
            "canhoto";  
         Middle(mimg_FileName;14;12) = "AssinaTestem" ; 
            "assinatura de testemunha";  
         Middle(mimg_FileName;14;10) = "AssinaResp" ; 
            "assinatura de testemunha";  
         Middle(mimg_FileName;10;3) = "Q11" ; 
            "documento de identificação frente";  
         Middle(mimg_FileName;14;11) = "AssinatResp" ; 
            "assinatura de responsável";  
       "--" 
       ) [/indent]
   )

Open in new window



Well sort of (needs to be debugged...

Anyway, the question is: is there a manner in a Filemaker calculation to put sevral instructions as a single one?

any help is appreciated
ASKER CERTIFIED SOLUTION
Will Loving
President, Dedication Technologies, Inc.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros