This topic is locked

Entering data from 'add new' only into first empty field?

5/11/2007 9:55:07 PM
PHPRunner General questions
R
rcurtin author

Ok so I have 3 sets of data (first, last and for invalid CC), (first, last name for expired CC), and (first,last name for Invalid Zip Codes). Now I currently have it set up so I have 6 feilds of entry in the "add new" page. My problem is I have alot more invalid CC numbers than I do of the other 2 fields. So when I add in invalid CC entry it makes a new record but the next record with an expired CC is 30 or so records up. I would like it to only enter the data in the next empty field of the database for each field (will post pics to explain... sorry I don't think I did it justice.
Ok so this is what it will start out like


This is what happens when I add one into each field (I do not want blank spaces)


This is how I would like it to input from the add page


Is this possible??

kujox 5/12/2007

Ok so I have 3 sets of data (first, last and for invalid CC), (first, last name for expired CC), and (first,last name for Invalid Zip Codes). Now I currently have it set up so I have 6 feilds of entry in the "add new" page. My problem is I have alot more invalid CC numbers than I do of the other 2 fields. So when I add in invalid CC entry it makes a new record but the next record with an expired CC is 30 or so records up. I would like it to only enter the data in the next empty field of the database for each field (will post pics to explain... sorry I don't think I did it justice.


I think I get what you're after, if you want to keep all the refused transaction data in the same table, I would have something like the following
first_name, Last_name,reason_flag
first and last are the same as your table, the reason_flag is why the transaction has been refused IE:
first last reason

sam jones expired CC

fred bloggs invalid ZIP

don duck invalid CC

alan sugar invalid ZIP

gordon brown expired CC
I hope this makes sense and if it does it also points you in the right direction.

R
rcurtin author 5/14/2007

Thanks for the reply but unfortunatly that would be more work than it is worth since it was converted from excel first/last were in seperate fields. I basically want the data to come from the "add new" page and instead of adding all data to the same record (figure 2) I want it to find only the next empty record for each field so the result looks like (figure 3)

J
Jane 5/14/2007

Hi,
you can do it using custom code in the Before record added event on the Events tab.

You should be familiar with PHP and SQL for that.