Normal Topic Coding suggestions needed for various items (Read 530 times)
josebetzy
Member
*
Offline


Hmmm. How? Cómo?

Posts: 33
Location: Las Piedras, Puerto Rico
Joined: Dec 15th, 2003
Coding suggestions needed for various items
Mar 8th, 2004 at 2:43am
Print Post Print Post  
I have some coding needs, that are probably common to many. Here goes.

1.  Formatting a social security number. (I know you could follow the phone number one).

2. Making sure that a record is not added twice. Check that a social security number is already in the DB or not.

3. I have a form with several tabs. Example: On Tab 1, I am in the last element. How can I tell Sesame that when I exit this element, it should go to Tab 2 and go to a certain element.

4. I want to have an element that when you enter a Y, it will open this record in another DB and specific form.
a. How can I check to see if that same record is already opened in that other DB. Yes, in the example a particular element would be used as the key identifier (say ID, Social security, Cust ID, etc.)
     
5. This is a little more complex and deals with arrays, I believe.

Each year the federal government (Education) sends out a list that is a matrix, for awarding funds based on two criteria found in a row and a column. The matrix has 44 rows and 44 columns.  The rows provide the costs ranging from $0 to $4050 in increments of about $100 and the columns start from 0 to 3851 in increments of about 100.  So it looks like a spreadsheet. Now, I look at the row and find the cost - then look at the column and look for the index number and I go down and across and find the value that is in this matrix. The resulting value is what is awarded to the student.

Is there a way of doing this.
* Each year this changes.
* I have to make one for every fiscal year.
* I have to keep this matrix available each year so that adjustments may be made in a subsequent year.  Yes, if the school has ten years of history funds, there must be 10 matrix tables, one for each fiscal year. (This requirement was recently changed to 5 years).

In QA I just made a database with all of the values (about 1900 of them depending upon the year). I assigned a letter to each row and a letter to each column. In another field I joined the two and searched in the database for that particular  resulting value. Wow, that was always a project that took a lot of time to enter values and do. Luckily it is the same for all schools.


  

Jose L. Muñoz
Back to top
 
IP Logged
 
FSGROUP
Full Member
***
Offline


No personal text

Posts: 179
Location: Edmonton, Alberta, Canada
Joined: Jan 14th, 2004
Re: Coding suggestions needed for various items
Reply #1 - Mar 10th, 2004 at 10:28pm
Print Post Print Post  
#1: Simple text formatting using @Left, @Right and @Mid and concatenation (ie., +) with either a space or "-" (your choice)

#2. use the XLU function to see if the SIN is already in the DB
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Coding suggestions needed for various items
Reply #2 - Mar 10th, 2004 at 11:14pm
Print Post Print Post  
Quote:
     
5. This is a little more complex and deals with arrays, I believe.

Each year the federal government (Education) sends out a list that is a matrix, for awarding funds based on two criteria found in a row and a column. The matrix has 44 rows and 44 columns.  The rows provide the costs ranging from $0 to $4050 in increments of about $100 and the columns start from 0 to 3851 in increments of about 100.  So it looks like a spreadsheet. Now, I look at the row and find the cost - then look at the column and look for the index number and I go down and across and find the value that is in this matrix. The resulting value is what is awarded to the student.

Is there a way of doing this.
* Each year this changes.
* I have to make one for every fiscal year.
* I have to keep this matrix available each year so that adjustments may be made in a subsequent year.  Yes, if the school has ten years of history funds, there must be 10 matrix tables, one for each fiscal year. (This requirement was recently changed to 5 years).

In QA I just made a database with all of the values (about 1900 of them depending upon the year). I assigned a letter to each row and a letter to each column. In another field I joined the two and searched in the database for that particular  resulting value. Wow, that was always a project that took a lot of time to enter values and do. Luckily it is the same for all schools.




You might want to consider making it completely linear. If you have a 4x3 array (matrix), you really have 12 elements. If you access those 12 elements as a linear list using:

element_number = ((row * NUMBER_OF_ROWS) + column)

you don't have to retain the complexity of using and accessing a matrix.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged