Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

sorting so i can duplicate portal records


This topic is 7217 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have two databases related to each other by a ticket number. When I create a new job a new ticket number is generated and I enter information into the related portal. It is imperative that the information in the portal retain the order in which it was entered. I have had no problem duplicating the ticket and all the records in the portal provided I don't mind sorting the portal records on a field that messes up the original order. My dilema is duplicating the portal records and maintaing the original entry order. If I sort on the ticket # (filemaker tells me it did sort them although it didn't actually change the order) I only get a duplicate of the first record in my loop. If I sort on any other field (filemaker tells me it did sort them) I do get duplicates for each record but not in the desired order. I know that I can enter say a serial number filed and increment it by 1 on creation and sort by that, but that just makes the database that much larger. Any other ideas?

Posted

Try sorting the related records based on the auto-entered serial. This should maintain the creation order. Then

Go to Record/Request/Page [First]

Loop

Duplicate Record/Request

Set Field [TicketNo; globalTicketNo]

Go to Record/Request/Page [Next; Exit after last]

End Loop

Posted

I guess I have already figured it out. I created several global fields, one of them a counter. I then ran thru the records and assigned them the counter number and increased it 1 for each record. Then a sort on that number which essentially keeps the records in the initial order. Then do my duplicating and blanking out the counter numbers. Works perfect everytime and doesn't increase the size of my database. Thanks for the help and sorry I posted maybe a little too soon.

Posted

That will work too, though it would be easier to loop through and set the sort field with Get(RecordNumber), which will return the current record number according to the sort order. But it isn't necessary, either, as long as your serial is ascending.

This topic is 7217 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.