10 Replies Latest reply on Jan 25, 2013 2:06 PM by SergioChávez

    Initial in Spanish

    SergioChávez

      Title

      Initial in Spanish

      Post

           I'm new to FM and Db's in general. I'm a film producer and have the need to create a contact Db of cast and crew members who have collaborated with us through the years, as well as a location Db and a prop/art department inventory.

           Thing is I live in a spanish speaking country and I don't know how to access a FM solutions in Spanish. So I've opted to translate the contacts solution field by field. So far it has worked, save for a hitch that is the initial in the show all contacts field. I've translated the initial field and Ive been quite thorough.

           The calculation is as follows:

            

           
      Upper (
           
                 
           
      Case
           
      not IsEmpty ( Apellido ) ;
           
      Left ( Apellido ; 1 ) ; 
           
                 
           
      not IsEmpty ( Nombre ) ;
           
      Left ( Nombre ; 1 ) ; 
           
                 
           
      not IsEmpty ( Empresa ) ;
           
      Left ( Empresa ; 1 ) ; 
           
                 
           
      not IsEmpty ( Celular & Convencional ) ;
           
      "#" ;
           
                 
           
      not IsEmpty ( Mail ) ;
           
      "@" ; 
           
                 
           
      " -- "
           
      )
           
      )
           But it's not working, it's not all that important but it's an aesthethic and useful feature I want in the Db.
            
           Thanks for everything.
            
           Ps: Apellido is Last name and Nombre is First name. Convencional and celular are home and mobile respectively. Empresa is company
            

        • 1. Re: Initial in Spanish
          philmodjunk

               And exactly HOW is it not working for you?

               The syntax looks correct if you want a single character returned that is the first letter of the first field that is not empty. Keep in mind that a field can look empty but not be empty if the characters, such as spaces, tabs, returns, etc are nonvisible characters.

          • 2. Re: Initial in Spanish
            SergioChávez

                 Thanks,

                 Its not working in the sense, everything is pilling up with no initial separation.

                  
            • 3. Re: Initial in Spanish
              philmodjunk

                   Are your records sorted by the Initial field?

                   A sub summary part, such as the one containing the initial field as a merge field, will not be visible unless your records are sorted by the field specfied as the "sorted by" field for that layout part.

              • 4. Re: Initial in Spanish
                SergioChávez

                     I have checked what you told me and it seems to be close to be fixed. Thing is that the sorting can't be modified, I add the "Inicial field" to the sort records but it always returns to how I found it as just the contact name field.

                     How do I modify sort records permanently? 'Cause that is whats causing the issue here, every script I could get my hands into has been modified to match the new spanish fields.

                • 5. Re: Initial in Spanish
                  philmodjunk

                       Check your layout for script triggers and the scripts assigned to buttons that bring you to this layout. Chances are that there are scripts that are not sorting the records for you by this field.

                  • 6. Re: Initial in Spanish
                    SergioChávez

                         The Layout Script Triggers are as follows.

                         The OnRecordLoad has this trigger (Trigger - Create Contact List):

                          

                          

                          

                          

                          

                          

                          

                         The OnLayoutEnter has this trigger (Trigger - Sort Contact List):

                         I'm still getting the hang so help me out seeing if there is any this can be put so that the initial stays in the sort order. Your help is much appreciated.

                          
                    • 7. Re: Initial in Spanish
                      philmodjunk

                           I can't get my browser to display your scripts.

                           To post a script to the forum:

                             
                      1.           You can upload a screen shot of your script by using the Upload an Image controls located just below Post A Answer.
                      2.      
                      3.           You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here.
                      4.      
                      5.           If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                      6.      
                      7.           If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format. (Use the HTML option on the database tab panel and paste the text into the forum's HTML editor.)
                      • 8. Re: Initial in Spanish
                        SergioChávez

                              

                              
                        First Script Trigger
                               
                        •            
                        •      
                        •            
                        •      
                        •           If [ Get ( RecordOpenState ) ≠ 1 ]
                        •      
                        •           Exit Script [ ]
                        •      
                        •           End If
                        •      
                        •           If [ PatternCount ( Get ( ApplicationVersion ) ; "iPad" ) ]
                        •      
                        •           Go to Layout [ “Contact Details | iPad” ]
                        •      
                        •           Else If [ PatternCount ( Get ( ApplicationVersion ) ; "Pro" ) ]
                        •      
                        •           Go to Layout [ “Detalles” ]
                        •      
                        •           Else
                        •      
                        •           Go to Layout [ “Contact Details | iPhone” ]
                        •      
                        •           End If

                              

                             Second Script Trigger

                               
                        •            
                        •      
                        •           If [ $$SCRIPT_TRIGGER = "Off" ]
                        •      
                        •           Set Variable [ $$SCRIPT_TRIGGER; Value:"On" ]
                        •      
                        •           Exit Script [ ]
                        •      
                        •           End If
                        •      
                        •           Set Variable [ $$FIND_SIMILAR; Value:"" ]
                        •      
                        •           If [ Contactos::Ordenar Selección = "Nombre de Contacto" ]
                        •      
                        •           Sort Records [ Keep records in sorted order; Specified Sort Order: Contactos::<Field Missing>; ascending Contactos::Nombre de Contacto; ascending ] [ Restore; No dialog ]
                        •      
                        •           Else
                        •      
                        •           Sort Records [ Keep records in sorted order; Specified Sort Order: Contactos::Ordenar Lista Key; ascending Contactos::Nombre de Contacto; ascending ] [ Restore; No dialog ]
                        •      
                        •           End If
                        •      
                        •           Go to Record/Request/Page [ First ]
                              
                        • 9. Re: Initial in Spanish
                          philmodjunk

                               You'll need to update this script step:

                               Sort Records [ Keep records in sorted order; Specified Sort Order: Contactos::<Field Missing>; ascending Contactos::Nombre de Contacto; ascending ] [ Restore; No dialog ]

                               Notice the <Field Missing> ?

                          • 10. Re: Initial in Spanish
                            SergioChávez

                                 THANK YOU

                                  

                                 THANK YOU

                                      THANK YOU

                                      Finally!
                                       
                                      Thank you!