4 Replies Latest reply on Jul 29, 2010 10:49 AM by basilisk2

    Auto Enter Date doesn't self create in Portal



      Auto Enter Date doesn't self create in Portal


      I'm trying to put together a layout that is intended to be used to keep track of phone calls, letters, emails etc with clients. This involves 2 tables in a one to many relation (one client can have many contact events, each contact event can only be for one client). To save time on data entry, I set the Date field to Auto-Enter on Creation.

      I created a layout based on the Client table, and added two fields, for ClientName and for ClientID. I then added a Portal to show some fields from the ContactEvents table, sorted in decreasing date order to always show the most recent date's event at the top (I hope!)

      My problem is that the date field in the portal does not auto-complete on creation in the portal. In the relation dialogue box between the Client and ContactEvents tables I have enabled "Allow creation of records in this table via this relationship" for both tables but can't see how to setup the auto-complete functionality so it works in the portal. Where am I going wrong?


        • 1. Re: Auto Enter Date doesn't self create in Portal

          "My problem is that the date field in the portal does not auto-complete on creation in the portal"

          Go to your related ContactEvents table's field definitions.  Find the creation date field.  It should be set to auto-enter 'creation date'.  Then whenever new records are created (even if via allow-creation and through portal), they will inherit the date they were created.

          • 2. Re: Auto Enter Date doesn't self create in Portal

            Many thanks for your help.

            That already is how I set things up. I just double checked by going to:

            File - Manage Database - Fields - [select field] - Options - Auto Enter

            Here the Options for field Date had a tick in the Creation box as you say it should be; in the validation tab I have 

            • - Validate Only during data entry
            • - Allow user to override during data entry
            • - Not empty

            When I go back to the data entry layout I have created, the portal shows the already entered record, and a blank line under this ready to enter the next ContactEvent record. However, when I click in the Date box, no date appears as I expect it to.

            Could this be because I did not add the ContactEventID field to the portal? This is an Auto-enter Serial type field, but there wasn't enough room on the portal layout so I didn't add it in the space available. Now the portal is created, I don't know how to check which fields it is "reading" or includes, I can only see those that have been dragged and added to the layout. I also don't know how to make the layout wider (only longer, by dragging the Body tag) even if I did know how to enter it.

            I need the maximum width in the portal because one of the fields is for notes about each ContactEvent, and this may be short or long depending on the Event. It would be great if the size of the box available to the data (and hence the row with it) could auto-expand depending on the amount of contents, but I don't think I can do this so I had to compromise with a scroll bar and a medium height, wide as possible (within the constraints) field width.

            You can probably tell I am not really doing so well on understanding Filemaker yet, so have given you all the info I can think of that might be relevant.

            I hope you can suggest something else for me to do!

            • 3. Re: Auto Enter Date doesn't self create in Portal

              Do not put any validation on the auto-entered creation date in your related table.  Whenever you display it for Users, you should turn off entry, uncheck selection (Field Behavior > uncheck allow field to be entered in Browse mode ... or if using Inspector, Data tab allow entry).

              Auto-enter creation date won't effect existing records - only newly added ones.  And no, you don't need the ContactEventID in the portal but if you display it you should always disallow entry to that field as well.  Usually, to save having to disallow entry to fields, I just place merge fields in their place.

              Your new ContactEvents record will inherit the date even if it doesn't display immediately when you are in the portal.  But if you type into a different field in the portal (such as a note or category field, the date should then fill in.  If it does not display, go to a table layout based upon your ContactEvents and see if the newly added record has a date.  Be sure that the creation date field is type DATE as well. 

              • 4. Re: Auto Enter Date doesn't self create in Portal

                Great! Thanks so much for your help, I knew there was something I hadn't quite understood, and you explained it all really clearly and it works just as intended now. You're a star!