fmp7_user_fmp7fmp7 Posted June 1, 2006 Posted June 1, 2006 I have a database with the following fields: isbn location qty For each isbn their are 3 locations each with different quantities. This geographic info needs to be imported into another database by quantity. So that the lowest quantity location is used first. I have a scripting solution that works but it is very, very, very slow. Can anyone take a look and see another way of doing it? location.zip
comment Posted June 1, 2006 Posted June 1, 2006 How about: Sort Records [ Specified Sort Order: location::isbn; ascending location::qty; ascending ] [ Restore; No dialog ]
fmp7_user_fmp7fmp7 Posted June 1, 2006 Author Posted June 1, 2006 Yes that will sort the records the correct way but my problem is how to import them into the next database. What I did to do this was create a script Sku1, that adds a 1 if the location has the lowest number of items, and adds a 2 for the next, ... This sets me up to have isbn1_1 isbn2_2 isbn3_3 I need to be able to use the above three fields to match their partners for import into the next database. The only problem is that it takes a really long time for the script to run through all the data. I thought about using a portal but I need to be able to create a field that is the match field for import and I cant get it to make a field in a portal. Does that make sense?
James_bk Posted June 1, 2006 Posted June 1, 2006 So you need to have the attached database create three new fields sorted from lowest location to highest such as xyz123_1 xyz123_2 xyz123_3 ??
comment Posted June 1, 2006 Posted June 1, 2006 I am afraid I don't follow. What fields are in the next database, and what is the purpose of moving the data there?
fmp7_user_fmp7fmp7 Posted June 1, 2006 Author Posted June 1, 2006 The fields in the next database are as follows: record1 isbn_1 isbn_2 isbn_3 where isbn is the actual isbn text. The purpose of moving the data there is to set up ordering for each individual isbn. This part of the process I cannot change, so i am trying to figure a quick way to set up the isbns in the attached database to sort the data by price and isbn and then number each accordingly. This numbering(1-3) will be the match field(isbn_1, isbn_2, isbn_3) with the next database so that an import can occur. If you look at the script sku1 you will see what I have come up with but this script takes hours and hours of time to run. I am looking for a more simple way of doing this task.
comment Posted June 1, 2006 Posted June 1, 2006 It sounds like a rather convoluted process, and I still can't wrap my head around it. It seems like you need to rank the 3 locations of each ISBN by quantity. If so, see the script I have added to your file. You can use the resulting Rank field in a calculation, or change the script to produce the result you need directly. BTW, if there were always 3 locations for each ISBN, you could simply sort the records, then replace the field's contents with a calculation that goes 1,2,3 in a cycle. location.fp7.zip
Recommended Posts
This topic is 6812 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 accountSign in
Already have an account? Sign in here.
Sign In Now