Jump to content

Repeating Field Sequencing


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

Recommended Posts

I need some help . . . I have 3 repeating fields of 24 each. One of these fields is the sequence number that the user prefers to have them displayed.

These fields represent line items on an order and are entered, as you might suspect, in the sequence that the order entry clerk puts them into the field.

However, the sales representatives want to be able to re-sequence them according to their preference. Hence the 3rd repeating field. I'm letting them enter the placement they desire for each line into the repeating sequencing field.

Now . . I'm trying to find an efficient method of re-ordering the lines to they will be in the order the sales rep wants.

I've considered re-writing the app to use a new table and 'portals', but am hoping to avoid the massive change if possible.

Any help is appreciated.

Link to comment
Share on other sites

You would do well to use a related file instead. There a couple problems with trying to work with repeating fields, and changing the order of the rows is certainly one of them. In order to do that, you would need a script to actually move the data from one row to another. There are two problems here. First, whenever you have a script move data around, you may lose data if a script fails or is canceled. Second, in FM5 getting your script to copy and set a particular repetition is somewhat complex.

With a related table and a portal, you can easily have a sequence field in the portal that would be used for the relationship's sort order. Changing this would automatically resort the portal rows. But a bigger advantage which you may not have considered is the ability to report on the items directly from the related file. You can generate a report on all the "widget" items for a particular date range, sorted by Sales Person, or a number of other variety of reports. If the items are the type that are always reordered/sold, you can also have an Item file which is related to the Line Items file. This can be used for checking inventory counts, and more.

Link to comment
Share on other sites

This topic is 6662 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.