4 Replies Latest reply on Jan 11, 2013 12:00 PM by philmodjunk

    Feedback Form



      Feedback Form



           I wanted to create a feedback form, one that looks like one of those instant messaging chat boxes. 

           I have a text field and I have a Temp Text field which is global.  Basically what I want to do is when they click in the temp text field, and press a button it enters the text above it in the text field. 

           So for that button I have a script which says set field Feedback::Text;and the calculated result is:  Feedback::Text & ¶ &
           "_________________________________________________________________________________________" & ¶ &
           "Created By - " & Get ( UserName )  & " - " & Get ( CurrentTimeStamp ) & ¶ & ¶ &
           Feedback::TempText  & ¶ & "_________________________________________________________________________________________" & ¶


           The next step says set field Feedback::TempText and the calculated result is ""

           I can type the text in the temptext field on the layout and when I hit the send button the temptext field goes back to blank but the text isn't appearing above in the Text field. 

           Any idea what I've done wrong? 

           My other question is how do I get this to create a new chat for each user, so that not all users see all the chat from previous users. 

        • 1. Re: Feedback Form

               Is Feedback::Text a field of type text?

               But you are really putting too much data into one field. Use a related table with several fields. One can auto-enter the user name. A second can auto-enter the creation time stampe and a Third can be a simple text field for the text entered by the user.

               A portal can be used to display multiple records and either the portal's relationship or its filter (in FileMaker 11 or newer) can limit the records shown to just the current user.

          • 2. Re: Feedback Form

                 Ok will try it that way instead....just saw a chat box looking one on another database that looked cool. 

                 So if I have a table called Users.....and a table called Feedback.......

                 Would I be correct if I create a layout called Feedback Form which was related to the people table, and put a portal to the feedback table? 

                 If so....a script on a button which said:

                 Set error capture on

                 Go to Layout Feedback form

                 Set field Feedback::Date ; Get current date

                 Set field Feedback::, Get (AccountName

                 Pause/resume script

                 Go to layout [original]


                 I wanted to put add new record here somewhere but wasnt sure if I put it in the wrong place would it add a record to Users instead of Feedback

            • 3. Re: Feedback Form

                   Sorry, forgot to mention I only wanted it to show one row which is why I wanted to add the new record promp because otherwise it brings up the same completed row every time as it is now.  I wanted each feedback to be its own record. 

              • 4. Re: Feedback Form

                     So if I have a table called Users.....and a table called Feedback......

                     You could relate them like this:

                     Users::__pkUserID = Feedback::_fkUserID

                     A portal to Feeback on a Users layout will list only records made from that current record in users.

                     You do not need a script to add in the user name and date. You can set up field options to auto-enter this info each tiem that a new record is created.

                     You can add a field Feedback::__pkFeedBackID defined as an auto-entered serial number in a field of type number.

                     Then you can sort your one row portal by __pkFeedBackID in descending order and the most recently posted feedback from that User record is the one record that will appear in the portal.

                     a script to start a new feedback record need only be:
                     Freeze Window
                     Set Variable [$UserID ; Users::__pkUserID]
                     Go To layout [Feedback]
                     New Record/Request
                     Set Field [FeedBack::_fkUserID ; $UserID]
                     Go To layout [Original Layout]