Field in Detail View does not appear when table comes from query

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
marcelo
Posts: 10
Joined: 2020-07-29 15:26

Field in Detail View does not appear when table comes from query

Post by marcelo » 2021-06-15 14:57

Friends, does anyone know why when a table in SQL is a query and we did a lookup field the field appears blank in the detail view, but table view does it appear?

Table view
Image


Detail view
Image

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Field in Detail View does not appear when table comes from query

Post by pbottcher » 2021-06-15 15:30

Hi,

can you post a little bit more information about the two lookup. Are they cascaded?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

marcelo
Posts: 10
Joined: 2020-07-29 15:26

Re: Field in Detail View does not appear when table comes from query

Post by marcelo » 2021-06-15 15:48

They actually fetch information from other tables.

I have the parent table and created two query tables for active and inactive employees.

In these query tables, the information in the detail view does not appear only in the table view.

Image

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Field in Detail View does not appear when table comes from query

Post by pbottcher » 2021-06-15 15:56

Hi again,

can you post the definition in AppGini (and possibly the query you use).

Do you have any errors in the browser console?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

marcelo
Posts: 10
Joined: 2020-07-29 15:26

Re: Field in Detail View does not appear when table comes from query

Post by marcelo » 2021-06-15 16:14

Hi, thank you so much for trying to help me.

The version of my AppGini is 5.84

Below are images:

Image

Image

Thanks!

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Field in Detail View does not appear when table comes from query

Post by pbottcher » 2021-06-15 18:12

Hi,

sorry, I'm struggling to understand what the funcionarios_activos sql statement is used for. In what relation is it to the funcionarios table?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

marcelo
Posts: 10
Joined: 2020-07-29 15:26

Re: Field in Detail View does not appear when table comes from query

Post by marcelo » 2021-06-15 19:24

I created a parent table (active employees) called employees and two queries for active and inactive employees (employees and inactive_employees)

In AppGini I only use queries (employees and inactive_employees)

It works perfectly, but the lookup field doesn't appear in the detail view

I don't know if you tell me to understand?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Field in Detail View does not appear when table comes from query

Post by pbottcher » 2021-06-15 19:58

Hi,

still struggling to understand what you mean by "I only use queries". Are you overwriting the query that is generated automatially from AppGini for your table? If that is the case you need to understand that the lookup field do not store the actual value, but the PK of the referenced table and within the query AppGini fetches the value from that table for the lookup through the PK.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

marcelo
Posts: 10
Joined: 2020-07-29 15:26

Re: Field in Detail View does not appear when table comes from query

Post by marcelo » 2021-06-17 13:57

Hello Friend!

Let's see if I can write in a more didactic way to understand.

I created 2 tables in App Gini. These 2 tables are derived from a parent table. The parent table is not in AppGini, just the lookup tables.

The parent table contains all the information.

In table 1 I did a select * from mother table and added a where so that it takes only a specific value.

In table 2 I did the same thing, a select * from parent table, but getting another value through where.

The issue is that when I look at the query table in the table view the fields (drop-fields) appear, but not in the detail view.

I don't know if I made myself understood this time.

Thank you for your help!

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Field in Detail View does not appear when table comes from query

Post by pbottcher » 2021-06-17 18:39

ok, where do you put your SQL statements?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply