8 Replies Latest reply on Oct 29, 2013 12:50 AM by synergy46

    Multi national currency display possible?

    synergy46

      I am using FM 12 advanced on OSX and Windows 7

       

      I have a membership application. It is a 'free' app that is being converted to run with a selectable language interface: German, French, Spanish and English.

      This works. (Thanks to Matthew Leering for the layout and script that makes this really easy)

       

      My question is: "Can my distributed runtime application be distributed so that when the user selects the language dropdown, Filemaker will display numeric values using the local users OS regional currency setup? Or, better yet, independent of the language dropdown, just display the currency as setup on the local computer in Mexico, for example?

       

      I compiled my app on a Windows 7 PC and, after changing the settings to Spanish and Mexico, ran my runtime a it still showed U$ currencies.

       

      What am I missing?

       

      Thank you

       

      Ron

        • 1. Re: Multi national currency display possible?
          synergy46

          Update:

          Further examination on this and other forums seems to indicate the solution revolves around the CLONE feature. 

           

          So, on a PC with regional settings of Spanish (I am in the USA) and with a Euro sign as the currency indicator, I open my FM162.fmp12 file and Clone it with no records as FM162 clone.fmp12.  Next I close FM162.fm12 and  open FM162 clone.fmp12 and confirm there are no records; just tables.  Then I run the FM162 clone.fmp12 IMPORT script (which works flawlessly with FM162.fmp12) and it fails to import any of my 25 tables except the main (Members) table.

           

          Also, when I examine clone 'Manage Database' Tables most of the 'child' tables are empty with a few showing the same 62 records as their parent (Members).  But, when I examine the child portal on the main layout, it is empty??? huh?

           

          I think that opening the clone 'adopts' the settings of the computer that opens it.  I don't get why my import script would essentially just import the parent table while the same script works on the original file and imports ALL the tables?

          • 2. Re: Multi national currency display possible?
            keywords

            Perhaps your import script depends upon some global values in order to work correctly. Global values are lost when you clone the file.

            • 3. Re: Multi national currency display possible?
              synergy46

              My import script uses global variables created in the script.  It does not rely on global fields. 

              Is this what you mean?

              If so, it begs the question "Why does the Members (parent) table import and children do not?

              variables.jpg

              • 4. Re: Multi national currency display possible?
                synergy46

                RE: loss of global values.

                 

                I have a table / layout that holds these fields:

                $$Variable

                Country1  (English)

                country2   (Spanish)

                Country3  (French)

                Country4   (German)

                 

                When the user selects a language from a popup, the $$Variable and the corresponding 'column' are read into memory.

                 

                On the main membership layout I have substituted $$LastName for the label Last Name for example.

                 

                This all works great.

                 

                labels.jpg

                 

                However, after I make a clone of my app and then run it, the Languages table is empty.  No records.

                 

                Is this happening because the first column is the $$variable column?

                • 5. Re: Multi national currency display possible?
                  keywords

                  A clone IS an empty file, with no records by definition. Although you are not, as far as I understand it, using global fields, I would say you would still need a record to exist, even if it contains no data in order for your table to function correctly. Just try creating a blank record and see if that fixes the problem.

                  • 6. Re: Multi national currency display possible?
                    synergy46

                    Add a 'new record' does not restore the deleted $$VariableName fields nor does it restore the other fields.

                     

                    It is starting to look like cloning is not the answer and that I will have to compile a separate version for each language.

                     

                    Or, is there a way to clone and retain table contents?

                     

                    (I suspect I am trying to get FM to perform in a way that it is not designed to perform) 

                     

                    Thanks for the reply.

                     

                    Ron

                    • 7. Re: Multi national currency display possible?
                      keywords

                      (I suspect I am trying to get FM to perform in a way that it is not designed to perform)

                       

                      Quite so.

                       

                      But I note that you also say: "Add a 'new record' does not restore the deleted $$VariableName fields nor does it restore the other fields."

                       

                      That suggests to me that you do in fact have some fields (are Country1, Country 2, etc fields?) which, whether global or not, will not retain any data if you save a clone—not that when you select clone under Save a copy… it actually says "clone (no records)".

                       

                      If you have some stored data that you want to retain why not store it in a single record in a base data table and save a copy with just that single record?

                      • 8. Re: Multi national currency display possible?
                        synergy46

                        It seems like I am headed in the wrong direction using the 'clone' function.  It seems right in that when the user openes a cloned application FM converts to the users native language.  But, the loss of some table information makes this too much hassle.

                         

                        Matt Petrowsky has a great video that uses global variables but he stores them in a text file and uses that tf as a source for a function after reading the users FM language. 

                         

                        I am a volunteer developer for a non profit so I am only willing to pursue this up to a certain limit.  At this juncture, learning Matt's method would just take too many hours and since there does not appear to be an 'intermediate' level solution that I could use, I think I will just use the existing method and let the user select their language and apply the appropriate variables to the layouts and dialog boxes.

                         

                        Thank  you for helping me get to the point where I understand I am going off in the wrong direction.

                         

                        ron