9 Replies Latest reply on May 1, 2014 5:23 AM by Sorbsbuster

    Insert Variable

    brodlang

      Title

      Insert Variable

      Post

      New to FileMaker. I'm looking for a simple script to insert a global variable into a field on a layout. When I use the script dialog options, I can't find a way to select an option that's not a field. 

        • 1. Re: Insert Variable
          Sorbsbuster

          Try the script step:

          Set Field [The FieldYouWantToSet ; $VariableYouCaptured ]

          • 2. Re: Insert Variable
            brodlang

            Duh, that was easy.  Thanks.

            • 3. Re: Insert Variable
              JulioRicardodaSilva

                   If I have a text field and I want to send to this field several other texts. I have a button 1 with the text "Text 1", button 2 with the text "Text 2" and button 3 with the text "Text 3" until the button 20.

                   If I click on button 1 it sends to the text field "Text 1", I click the button 2, it also sends the "Text 2, getting:" Text 1 Text 2 ". And if I click on button 3, it also adds "Text 3". Getting " Text 1 Text 2 Text 3". Continuing until the button 20.

                    

              • 4. Re: Insert Variable
                Sorbsbuster

                     I would suggest you set the text that each button adds as the button's script parameter.  Then make the script the same for each button:

                     Set Field [ YourTextField ; YourTextField & Get ( ScripParameter ) ]

                     You may want to add a space, or a comma, between the existing text and the text you are adding.

                • 5. Re: Insert Variable
                  JulioRicardodaSilva

                       Dont working....

                       Help me...

                       The button "Eu quero comer" go open other Layout and should add " Banana ", for example, above, getting...." Eu quero comer Banana ".

                        

                       Tks

                  • 6. Re: Insert Variable
                    Sorbsbuster

                         Here is a demo file:

                         http://www.4shared.com/file/1NYjCT2pba/Demo_To_Add_Text.html

                         You can add some text to start the sentence, then add some more to finish it.  If you want to go to another layout first, just add 'Go To Layout' script step  into the script.

                    • 7. Re: Insert Variable
                      JulioRicardodaSilva

                           That's it !!

                           Thank you so much !!

                           Show de bola !!

                            

                           Valeu !

                      • 8. Re: Insert Variable
                        JulioRicardodaSilva

                             You are the "MAN".

                             Without abuse, how make play a specify sound file, when touch a word? When to touch the word "banana", play the banana.mp3.

                             On Macbook, work, but on iPad, dont working.

                             Help me, please.

                              

                             Tkx

                        • 9. Re: Insert Variable
                          Sorbsbuster

                               It may help others to answer your question if you can tell us which version of Filemaker and Filemaker Go you are using.

                               I assume you have made it work on your MacBook by holding the 'banana.mp3' file in a Container Field, and the script plays the contents of that field.

                               It would work the same way on Windows, but I know there are some limitations to how FM Go handles sound files.  Unfortunately I have almost given up on using FM Go as so often it works 99% of the time but then a very important function isn't available (in this case, for you, being able to play the sound file).

                               So I have no experience of making this work on an iPad.  Sorry.