473,394 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Sorting data entry against fixed array list

2
I am printing a booklet that has several different funds. These booklets stack the funds related to each record but they must be in a specific order. The problem is that the data does not come in the order that the funds need to be printed.
1) I have a data list of the order in which the funds must print, i.e. 331E, 331F, 192E, 192F, 162E, etc.
These fund numbers do not follow an alphabetical or numerical order, but they have to remain and be retrieved in this order.
2) data spreadsheet does not necessarily come in this order, so I need a script to re-sort it to follow the order of the data list above.
For example, the data comes in this order: 162E, 192E, 331F
I need to pull those funds and set them in order, therefore: 331F, 192E, 162E

Hoping this question makes sense.

Please help!!

I meant to add that I'm not re-sorting the data spreadsheet, I just need the software that I am using to retrieve the data to resort the values for me.

I hope that makes sense.
Feb 21 '15 #1
3 1394
Rabbit
12,516 Expert Mod 8TB
I'm struggling to see how this relates to javascript.
Feb 21 '15 #2
CC123
2
Yes I suppose I was not more descriptive.

I use a page composition software to create booklets with variable data merged into it, including variable pages that relate to these "funds". The way the 'fund' pages are populated is by way of a data spreadsheet with NAB + the different kinds of funds that people own. Each record has columns (fund1, fund2, fund3, etc) with the different funds they own, for example, 331E, 332E, etc.

These funds have to be put in a particular order. There are for example 30 different fund types and their order is not alphabetical or numerical order. So, the order they have to go in is specific but does not follow a pattern. For example, 331E, 331F, 192E, 192F, 162E, etc. As you see the order in which they fall has no alphabetical or numerical order, but that is the specific order they must be in.

So say Record No 1 owns 3 funds. The data does not necessarily come in the order that they should, for example, 162E, 192E, and 331E. So, I need a script that directs the page composition software to pulls the funds and put them in the order that they need to be in, that is, 331E, 192E, and 162E.

Note: The data folks did not sort their data with the funds in the correct order; and sometimes they do, sometimes they don't. I need to find a way to run this script each time regardless of whether they do or don't.

There is the option of running a javascript script before the booklet is composed. My variables link to the data to pick the funds type (normal process), but before creating the pages, it would sort the incorrect order of the funds into the correct order and then compose the pages.

These funds are 3 pages of information for each fund type that are called to via my variable. So if the data calls for fund 331E, it pulls in the three pages of information for fund 331E.

I was thinking that maybe an array type function would help me with this as in myArray(331E, 331F, 192E, 192F, 162E) and then doing a statement that compares the funds pulled from the data against the array list and re-sort, etc. but I'm not well versed in javascript so I don't really know where I would begin.

Maybe i'm dreaming.

CC
Feb 21 '15 #3
Rabbit
12,516 Expert Mod 8TB
So are having trouble sorting in JavaScript? Or do you know how to sort but not when the data isn't in alphabetical order?
Feb 22 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Philippe C. Martin | last post by:
Hi, I'm looking for an easy algorithm - maybe Python can help: I start with X lists which intial sort is based on list #1. I want to reverse sort list #1 and have all other lists sorted...
6
by: supercomputer | last post by:
I am using this function to parse data I have stored in an array. This is what the array looks like: , , , , , , , , , , , , , , , , , , , , , , , ] This is the code to parse the array:
0
by: tamilan71 | last post by:
Can anyone tell me a simple method of creating an application in Access 2003 that uses "Double data entry"? For me double data entry is defined as the ability to have data entered twice. The first...
16
by: jhwagner | last post by:
I need to use double data entry with an MS Access database. I have read many arguments and reasons against this on this group but I have to do this. I have seen various tips on how this can be...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
8
by: Wingot | last post by:
Hey, I have a program I am trying to write using Visual C#, SQL Server 2005/2008, and Visual Studio 2008, and one part of it includes a Schema called Client. Inside this schema, three tables...
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
3
KevinADC
by: KevinADC | last post by:
If you are entirely unfamiliar with using Perl to sort data, read the "Sorting Data with Perl - Part One and Two" articles before reading this article. Beginning Perl coders may find this article...
3
by: Paul Furman | last post by:
I'm not sure what it's called, a data entry form with long list to choose from where you select with shift, control & drag then hit the arrow button to move those into the box on the left. A nudge...
5
by: cstansbu | last post by:
This is the item selection piece for a Sharepoint knowledge base. If you type a valid plan code you get info, but if you type garbage you get a 404 file not found. I want to check user input against...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.