Lookup fields (auto-fill) linked to two data entry fields

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
rprevost
Veteran Member
Posts: 47
Joined: 2018-05-30 22:09

Lookup fields (auto-fill) linked to two data entry fields

Post by rprevost » 2018-12-02 21:21

Hello to you all,

Hopefully one of you can assist me in finding a solution to the following problem I have with an application I designed with AG.

Table A : list of people (name, email, phone, ....) === the same person can be at times a supervisor or a co-supervisor, or he can be a teacher. Each and every people in the list can have one of the three position as a helper for persons requiring help (Table B)
Table B : list of persons who are requesting help from people (name, dates, usual stuff, name of supervisor, name of co-supervisor, phone of supervisor, phone of co-supervisor, email of supervisor and email of co-supervisor)

In MS Access the lookup links the value of IDPeopleSup from Table A to IDPeople from Table B. So it is possible to retrieve email and phone number for IDPeopleSup and also to retrieve email and phone number from IDPeopleCoSup.

With AppGini, it does not seem to work like in MS Access. Once the first link is done in the Lookup field for a given parent table, it can only retrieve the email and phone number from the first people (Supervisor). I could not find a way to link to email and phone number for people CoSupervisor).

Am I missing something here? How can I achieve what I want?

Since the same people (Table A) can have different status depending on what the person (Table B) requests, it would not make sense of creating three people tables (peopleSuper, peopleCoSuper, peopleTeacher).

Any help would be appreciated here.

sjohn
Veteran Member
Posts: 86
Joined: 2018-05-23 09:32

Re: Lookup fields (auto-fill) linked to two data entry fields

Post by sjohn » 2018-12-03 10:13

Hello rprevost

I think this is not possible in AG without coding. I cannot help with code.

I could suggest a solution that requires no coding.

You make 4 tables

Table A - list of people that can be either supervisor, co-supervisor or teacher.

Table B - List of people who are requesting help.

Table C - table with 3 entries ( Supervisor, Co-supervisor and Teacher )

Table D - List of assistance.

Table B should be defined as parent and as child to B should be defined D.

In D should be lookup-fields for the fields that is wanted from table A and then a lookup field for table C that is defining the role for the helper.

The table D will not be redundant as it will only hold Id's for the two other tables - You could also include a textfield that should hold information for the relation - could be : "remember to go to the xxx each monday" )

Then you could have a view where table B is shown in detail-view, and then the assistance is shown in a table beneath.

For each table B record, there will be shown one, two or three entries from the D table. There could be more if there is wanted more than one co-supervisor.

I know it is not exactly what you want, but making it as parent/child relation gives the opportunity to make notes on each relation.

Maybe it could be used as an inspiration to a solution.

Or maybe one of the super-coders have a solution.

Kind regards

rprevost
Veteran Member
Posts: 47
Joined: 2018-05-30 22:09

Re: Lookup fields (auto-fill) linked to two data entry fields

Post by rprevost » 2018-12-04 14:18

Thank you for taking the time to help me with this problem. Your solution is clever.

rprevost
Veteran Member
Posts: 47
Joined: 2018-05-30 22:09

Re: Lookup fields (auto-fill) linked to two data entry fields

Post by rprevost » 2019-01-12 21:53

Hello to all of you.

I am still experiencing some difficulty understanding lookup fields and I hope one of you can help me because, my app is coming along very well so far (thanks to Mr Geany). So here it goes:

In my mind a lookup value should help me to retrieve a piece of information based on specific criteria. In MS Excel or MS Access the logic of the lookup function is like this: lookup(what,where,which value to retrieve).
So the lookup (
what is the common value shared by the source table field and the target table field
where is the target table name
which value one wants to retrieve

To me this is simple. I link the value of a given field in the source table (usually an id of some sort) with the value of the target field of the target table (usually the primary key)
Once the link is established, I can retrieve the value of any field in the target table for a particular.

The beauty of this thing is that I can retrieve values from the target table from lets say (id_supervisor, id_cosupervisor, id_teacher, ...) in the source table to the id(primary key of the target table). This way i can retrieve, for instance the phone numbers of the supervisor, the cosupervisor and the teacher.

This is simple to me. But with Appgini, the auto-fill does not allow me to specify the source field. This is very limiting.

Maybe one of you can help me on this matter.

Regards.

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Lookup fields (auto-fill) linked to two data entry fields

Post by a.gneady » 2019-01-24 14:56

This is simple to me. But with Appgini, the auto-fill does not allow me to specify the source field. This is very limiting.
Auto-fill lookups consider the "source field" to be the first non-auto-fill lookup to the same parent table ...

For example, let's say you have a 'lessons' table, and you add a lookup field called 'Teacher' to it, which is set as a lookup to 'teachers' table. And you also add 'Assistant_Teacher' field, which is also a lookup to 'teachers' table. If you then add a 'Teacher_email' field as a an auto-fill lookup, it would display the email of the 'Teacher' rather than the 'Assistant_Teacher'. We plan to add a way of specifying which 'main' lookup to use in these cases in future releases.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

rprevost
Veteran Member
Posts: 47
Joined: 2018-05-30 22:09

Re: Lookup fields (auto-fill) linked to two data entry fields

Post by rprevost » 2019-02-04 12:34

Thank you for your great work. I hope this "improvement" will come soon.

rprevost
Veteran Member
Posts: 47
Joined: 2018-05-30 22:09

Re: Lookup fields (auto-fill) linked to two data entry fields

Post by rprevost » 2020-02-23 20:56

Hello to you all,

Mr a.gneady replied the following : "We plan to add a way of specifying which 'main' lookup to use in these cases in future releases."

After a year of waiting for a solution to the above problem, I was wondering what is the best way to solve my problem.

Regards,

Post Reply