How to realize a dual lookup?

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
schepke
Posts: 1
Joined: 2020-09-12 16:12

How to realize a dual lookup?

Post by schepke » 2020-09-13 05:51

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

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: How to realize a dual lookup?

Post by onoehring » 2020-09-29 14:47

Hi,
I do not understand what you mean. Should one be able to input project and activity into the logging table?

Olaf

Post Reply