Hi all.
I'd like advice on the preferred "Revolution" way of handling this situation:
I have a Customer table. Contains these fields, among others: phone number, name and key. The key is a simple numeric, auto-incremented by MySQL.
Typically, the user will search for the proper customer record by entering the phone number. I'd like to display to the user just the phone number and the name, but not the key.
However, when the user selects a customer, I need to access the database record with the key.
What would be a good Rev-like way of doing this?
(One approach I've thought of would be to use a scrolling field with a few tabs; the last tab being outside the visible area of the field. I would then use some sort of chunk expression (word -1 of the clickline, maybe?) to access the key and then the full record. What do you think?)
Thanks for your comments and suggestions!
Design: how to use, but not display a primary key?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Design: how to use, but not display a primary key?
Michel
Montréal, Canada
Montréal, Canada
Hi Michel,
I don't know what the preferred "Revolution" way is, I only know what the preferred "Glen" way is:) , but maybe it could be of some help.
If I understand you correctly, you can do this a couple of ways.
You could select your fields in the "select" part of your sql query then dump the response from revDataFormQuery in to a field. The results will be tab delimited.
Or you could just dump all the fields (using *) in to an unseen field or variable and run a repeat loop selecting the fields you want to display using the "item" chunk in to your display field. Make sure to set the itemDel to tab.
Hope this makes sense.
Glen
I don't know what the preferred "Revolution" way is, I only know what the preferred "Glen" way is:) , but maybe it could be of some help.
If I understand you correctly, you can do this a couple of ways.
You could select your fields in the "select" part of your sql query then dump the response from revDataFormQuery in to a field. The results will be tab delimited.
Or you could just dump all the fields (using *) in to an unseen field or variable and run a repeat loop selecting the fields you want to display using the "item" chunk in to your display field. Make sure to set the itemDel to tab.
Hope this makes sense.
Glen
Or, have one table field and one list field, and as you get the db from MySQL, parse each line, place the phone and name in the field, and the key in the list. So line 1 of the table, and line 1 of the list are the same entry, but of course, the key isn't showing in the table, and the list is invisible, so the user only sees the name and phone number.
Now when they click on an entry in the table, you know what line they clicked, and you simple take that, and grab the key from the list at that line.
Now when they click on an entry in the table, you know what line they clicked, and you simple take that, and grab the key from the list at that line.