Can autofill save the looked up value?

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
eagle
Veteran Member
Posts: 39
Joined: 2013-01-09 15:38

Can autofill save the looked up value?

Post by eagle » 2016-01-19 15:11

I would like to use someting like lookup + autofill, but instead of storing the id of the record in the parent table, the "looked up" value should be stored instead.

Example:

1. In my orders table I have a lookup field called "Customer_name". This field looks up the customer name in my customer table.

2. Instead of having orders.customer_name as an integer that simply stores the id of the customer, I would like orders.customer_name to be a varchar() field that store the actual name of the customer (at the point in time when the order was created).

But lookup functionality should be preserved when entering the record, so that we can pull the name of the customer when the order is created.

Thanks for all help.

User avatar
shasta59
AppGini Super Hero
AppGini Super Hero
Posts: 231
Joined: 2013-01-08 19:40
Location: Calgary, Alberta, Canada

Re: Can autofill save the looked up value?

Post by shasta59 » 2016-02-08 16:13

It is usually nice to know what version you are using. A good idea is to put the following in the first line of your post.

Using Appgini version 5.50

And yes what you want can be done but it will take manual coding to do so and some changes to the database structure. This is not built into AppGini but you should be able to do it by flexing your php/mysql programming skills a bit. In concept it should not be too hard to do.

As I am busy with a few projects I do not have time to code this up and document all the files which have to be changed.

Why do you need this to work this way?

Thanks
Calgary, Alberta, Canada - Using Appgini 5.50 -

eagle
Veteran Member
Posts: 39
Joined: 2013-01-09 15:38

Re: Can autofill save the looked up value?

Post by eagle » 2016-03-10 08:24

Thanks, shasta59.

Got it sorted by hiring some help.

>Why do you need this to work this way?

It was for a log table for archiving puposes.

Post Reply