Jump to content

multi field- Export data

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

Recommended Posts

I have a database with the following fields:




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?


Link to comment
Share on other sites

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




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?

Link to comment
Share on other sites

The fields in the next database are as follows:





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.

Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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