Page 1 of 1

How to realize a dual lookup?

Posted: 2020-09-13 05:51
by schepke
Hello,

I'm new to AppGini and do not get ahead ... :-(

AppGini Version 5.84

Structure, simplified:

table 'logging' - fields: id, duration, project [lookup, id], activity [lookup, id]
table 'projects' - fields: id, name
table 'activities' - fields: id, activity

table (relation) 'r_prj_act' - fields: id, project_id, activity_id => (each project has a set of activities)
table (relation) 'r_ma_prj' - fields: id, ma ( = <%%creatorUsername%%>), prj => (each user has a set of projects)

Result - in each case one direct and one indirect lookup works:

Case 1:
table 'logging' - project [lookup to table 'projects'], activity [lookup to table 'r_prj_act']
I get all projects and the desired set of activities.

Case 2:
table 'logging' - project [lookup to table 'r_ma_prj'], activity [lookup to table 'activities']
With modified ajax_combo (WHERE `r_ma_prj`.`ma`="'.$_SESSION['memberID']) I get the user specific set of projects and all activities.


But I need a double indirect lookup:
table 'logging' - project [lookup to table 'r_ma_prj'], activity [lookup to table 'r_prj_act']

Desired result: user specific set of projects and the project specific set of activities.

I can not get these two things combined. Thanks a lot for help!

Markus

Re: How to realize a dual lookup?

Posted: 2020-09-29 14:47
by onoehring
Hi,
I do not understand what you mean. Should one be able to input project and activity into the logging table?

Olaf