"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.
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!
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.
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!