5 Replies Latest reply on Dec 13, 2011 3:27 PM by philmodjunk

    Simple note script won't work in IWP

    JohnMaston

      Title

      Simple note script won't work in IWP

      Post

      I have a simple note script that I copied from the "missing Manual"

      Set Selection [field;Start Position: 0; End position: 0]

      Insert Text ["  "]

      Set Selection [field;Start Position: 0; End position: 0]

      Insert Calculated Result

       

      I have used it several times with no issues, but when i tried it on a IWP database  nothing happens.  Any Suggestions??

      Thanks,

      John

       

       

       

       

        • 1. Re: Simple note script won't work in IWP
          philmodjunk

          What is this script supposed to do? Don't know why it won't work in IWP, but this looks like something more simply done with a set field step instead of what you have here.

          • 2. Re: Simple note script won't work in IWP
            JohnMaston

            This is a simple note field....  Upon activating the script It it appends the date and user at the top of the notes field and allows the used to enter their comment.  I simply copied this from File Maker Pro Missing Manual book.   If you know of an easier way I am all for it.

            For example:

            12/11/11  johnm     talk to client

            12/10/10 johnm     LMTC

            12/8/11  johnm     Spoke to assistant

             

            Thanks,

             

            John

            • 3. Re: Simple note script won't work in IWP
              philmodjunk

              The better option is to make each entry a separate record in a related table and use a portal for working with your notes. Your script would then create a new record in your related table each time instead of editing a text field.

              If, instead you decide to stay with the current method, a single set field step can do this:

              Set Field [YourTable::NotesField ; List ( Get ( CurrentDate ) & " " & //put calculated result expression here ; YourTable::NotesField )]

              This inserts a new line of text with the current date before any text already entered in the field.

              • 4. Re: Simple note script won't work in IWP
                JohnMaston

                Ok I took your advice and made a related table/portal structure.  Basically I copied the new note script from the starter solution.  All works well , the only thing is that the curser inserts at the beginning of the note field (before the date and user info) when viewing from iwp.  Is there a way to put it at the end of the calculated result string.

                Thanks,

                John

                • 5. Re: Simple note script won't work in IWP
                  philmodjunk

                  If you use a table and portal, this should not be an issue. Set up one field for the date--can auto-enter the current date if you want, one field for the name and then use a third field for the text the user needs to enter manually. Don't know if Go To Field works in IWP. If it does you can use it to put the cursor in this third field. You can also try taking the other fields out of the tab order to get the cursor where you need it.