Does anyone have any ideas for forcing a folder to sort (e.g. on name) when a new record is added? I know you can sort on folder click, but when adding a new record within a form with a relationship to the folder (when you click on the field with a relationship and choose New) it just gets added to the end of the list. So next time you add this way, the new records are at the bottom. I have looked at all possible configurations (for folders and in the design area) and can't find anything that works.
I'm not sure I understand your question.
Are you trying to sort records assigned to a many to many field?
If so, see attached image. You can right click on your many to many field and then select configure appearance. Once you do, you will see the attached window.
This is a one to many. I have individual items that are assigned to a customer. An item can only be assigned to one customer but one customer might have many items. So I have a field on the item record that links to the customer record (I use e-mail address). Sometimes the customer doesn't exist, so I right click on the relational field and choose to create a new customer. When that customer is added they go to the bottom of the table which will never get sorted unless I go to the customer table and sort it there. Does that make sense? I tried the setting you mentioned but I think what that does is order the relational field when there is more than one entry in it, which there never is in this case.
Try this....Given some sleep I'm sure I could come up with better ways.
Anyway...open the attached database. As you can see when you open this the Contacts are not in alphabetical order.
Go to the One 2 Many folder and add right click to create a new record in the relation field.
Now have a look at the contacts folder. It should be in alphabetical order.
Thanks. I can't get it working for my database though. What I can see you've done is add an "on edit" script to the relationship field which sorts contact records on edit. Is there anything else I've missed? What does the line [$count check] = folRecN(1073) do?
On further investigation, what it is doing for me is sorting the items folder by the surname of the contact associated with that item. It isn't sorting the contacts folder. I may have to put together a demo database of what I'm trying to do.
I've just got around to looking at this in detail, and I just can't get this to work. With the example you attached, if I create a new contact via the one to many field, it is not sorted in the contacts folder and nor is the list of names sorted when I go to add another contact via the one to many field. The new contacts are just shown at the bottom in the order created. I'm lost now!