1 Reply Latest reply on Jan 20, 2010 2:10 PM by TSGal

    Interactive Field

    dekade

      Title

      Interactive Field

      Post

      I want to create a field where 4 people can talk (discuss) back and forth. Here's how I want it to work. Can anyone help me do it?

       

      1)    First I will have 4 colored buttons: Green = Tom; Blue = Dave; Purple = Sally; and Red = Jane

      2)    Each button will have a script.

      3)    Example I:  Left click on Green and the following script takes place:

             a.)    You are sent to the "Discussion" field

             b.)    If the field is empty then

                     1.    The typeset is set to Green ( 0, 128, 0 ); the word " 'Tom:' (and three spaces)" is typed in. Now Tom can continue typing text in the color Green.

             c.)    Else

                     1.    Upon entering the field the cursor is positioned after the last text character in the "Discussion" field.

                     2.    Then the carraige return is entered twice to get to the position of 2 lines below the last line of text.

                     3.    The typeset is set to Green ( 0, 128, 0 ); the word " 'Tom:' (and three spaces)" is typed in. Now Tom can continue typing text in the color green.

       

      4)    Example II: The "Discussion" field has already been typed in with Green colored typeset by Tom; Now Jane wants to answer Tom.

             a.)    You left click on the Red button

             b.)    You are sent to the "Discussion" field

             c.)    Upon entering the field the cursor is positioned after the last text character in the "Discussion" field.

             d.)    Then the carraige return is entered twice to get to the position of 2 lines below the last line of text.

             e.)    The typeset is set to Red ( 255, 0, 0 ); the word " 'Jane:' (and three spaces)" is typed in. Now Jane can continue typing text in the color Red.

       

      And the scenario continues on indefinitely with each person typing in their color.

       

      Filemaker Pro Advanced 9.0

       

      I sure hope this can be done because it will give what I am doing a neat little twist.

       

      If this cannot be done can anyone come up with something that will get me real close to what I have designed?

       

      Thanks,

       

      Dekade

       

       

       

        • 1. Re: Interactive Field
          TSGal

          dekade:

           

          Thank you for your post.

           

          Create a script, "Talk" with the following two script steps:

           

          Set Field [ Discussion ; If ( IsEmpty (Discussion) ; "" ; Discussion & "¶¶" ) &

             Case ( Get ( ScriptParameter ) = "Green" ; TextColor ( "Tom:   " ; RGB (0;128;0) ) ;

                Get ( ScriptParameter ) = "Blue" ; TextColor ( "Dave:   " ; RGB (0;0;128) ) ;

                Get ( ScriptParameter ) = "Purple" ; TextColor ( "Sally:   " ; RGB (128;0;128) ) ;

                Get ( ScriptParameter ) = "Red" ; TextColor ( "Jane:   " ; RGB ( 128;0;0)) ;

             "")

           

          Go to Field [ Discussion ]

           

          -------------

           

          Now, with each of your four colored buttons, call the same script, but pass the Script Parameter "Green", "Blue", "Purple" and "Red".

           

           

          When the button is pressed, the appropriate color is passed to the script and is referenced with Get (ScriptParameter). If the field is empty, we want to start on the first line.  If not empty, then we want to repeat what is there, skip down two lines, and enter the name of the specific person in the appropriate color followed by three spaces.  In the second script step, we just go to that field, which puts the cursor at the end of that field, and start typing in the color.

           

          If you need clarification for any of the above steps, please let me know.

           

          TSGal

          FileMaker, Inc.