relationship problem

 

Hello guys.  I don't know if that is really possible but...

miguelferdis_1-1676749392569.png

I have this structure. Statistics Table has a ref to Playerteam Table, and Playerteam has refs to players and teams tables. 

When I see the List View Statistics, I can see the column "name" (player name) well. 

Even in the Detail View Statistics, I can see the player name.

The problem is in the automathic search at the top of the screen (List View Statistics).  When I select that, I cannot search for that name. There, appears the key of the table, not the name of the player.

Any help will be welcome. Thx so much.

Solved Solved
0 10 231
1 ACCEPTED SOLUTION

Hi again @dbaum ,

At the end I use a virtual column "type = enum" with "basetype = ref to grandfathers table" and "app formula = [father].[grandpa]".

I don't know if It's the best way to do it, but It works out well.

Thx so much for your help

View solution in original post

10 REPLIES 10

There are two ways to create References between tables - AppSheet Help. The referencing column can be either of the following:

  1. Ref type
  2. Enum type with base type Ref

The main difference is that #1 automatically creates a [Related Rows] virtual column in the referencing table, which can be very handy.

Anyway, you could try switching to the other method to see whether that governs the behavior you observe.

Tente ocultar a chave da mesa para que ela não apareça 

Hi @Marco_Antonio_N ,The check in the "show" property is off. I don't know if you are reffering to that. But The search area shows the key anyway.

miguelferdis_0-1676763521022.png

May be Im wrong and you are reffering to other thing?? thx

Hi @dbaum ,  Same behavior 😞

Any other idea?? thx

 

 

I tested the filter functionality you're asking about using both types of Ref column that I described. In both cases, I see the referenced table's label column values--not its key column values. Are you sure you have the referenced table's label column designated?

Source data in referencing table's Ref and Enum-Ref columns:

dbaum_0-1676782092712.png

Filter list values for Ref column:

dbaum_1-1676782149071.png

Filter list values for Enum-Ref column:

dbaum_2-1676782179378.png

 

Hi there @dbaum , 

Maybe I did't explain well.  you are right, in those examples everything works fine.  I did a little structure tu show my problem.

miguelferdis_0-1676914339943.pngmiguelferdis_1-1676914354882.png

miguelferdis_2-1676914441038.pngmiguelferdis_3-1676914641333.png

 

Father is an intermediate table.
What I want is:
  In kids view, show the name of the kid and the name of his grandfather (I got that).
  In kids view, inside the search screen, I want to see grandfather's names and not the key. I know this is not the best example, coz this case can be solve in other ways.  But this is the situation. A table ref to another table, and this table ref to another table. I want to see in the last table, the label of the first table, and I want to filter with that label as well.

miguelferdis_4-1676914917125.png

 

I hope It has solution.  Sorry if I can't explain well or maybe this has not solution. Thx for your help and your time

 

What you're seeing presumably stems from the fact that you've configured a Ref column as the table's label column, and that Ref column's value is what's shown in the context of its child table.

For users who need to filter the Kids view, you could experiment with creating instead another column--it could be a virtual column--with an App formula expression like:

[father].[grandpa]

Or, if necessary:

[father].[grandpa].[Grandfather]

 

Yes, you are totally right.
I had already tryied [father].[grandpa] and it workes out.  But the problem is that in the search dialog I have to write the name to filter. There is not a list of grandpas where to choose.  I guess I can use the "valid if" input property in the new virtual column to select all the grandpas who are in the list of kids, but I don't know how.

Thx again

Hi again @dbaum ,

At the end I use a virtual column "type = enum" with "basetype = ref to grandfathers table" and "app formula = [father].[grandpa]".

I don't know if It's the best way to do it, but It works out well.

Thx so much for your help

I'm glad you found a way to accomplish your goal. You should mark your reply as the solution for future reference by anyone seeking information about this issue.

Top Labels in this Space