How to create a REF_ROW when using a Enum List, base type Ref

When creating a REF type column I do get the virtual column REF_ROW automatically in the table where i'm referring from. However, when im using a ENUM list/Base type Ref I do not. Has anyone been able to recreate the REF_ROW using a ENUM list/base type Ref? 

Solved Solved
1 18 727
2 ACCEPTED SOLUTIONS

First, I'm more inclined to use FILTER() which is the same as using a SELECT() when it's pointing to the key column of the respective table.

FILTER() - AppSheet Help


Second, some expressions that return a list of values has an argument that is evaluated on each row to decide if a row is going to be considered or not (so the expression should return yes/no), that's the case of FILTER() and SELECT().

SkrOYC_1-1663181716089.png


Third, IN() return yes if the item (the first argument) is inside the list (the second argument)

SkrOYC_2-1663181728858.png

View solution in original post

@SkrOYC I did it! See, sometimes we just need a little push. You just save me a whole week, probably weeks of being miserable by not getting this. ๐Ÿ˜‚ My brother Thank you!

At one point you have to lose the manual and get your hands dirty.

@SkrOYC do you know why its says "Note: This expression could impact performace"?

Screen Shot 2022-09-14 at 3.01.55 PM.png

Screen Shot 2022-09-14 at 3.04.24 PM.png

View solution in original post

18 REPLIES 18

REF_ROWS() is just a fancy wraper of Select().

Do a Select() or Filter() witn IN()


@SkrOYC wrote:

REF_ROWS() is just a fancy wraper of Select().


It's not. It's more efficient, and comes with some extra functionality.

 

That's why it's fancy ๐Ÿ˜‚

Steve
Platinum 4
Platinum 4

You can use REF_ROWS() yourself; it's not only for auto-generated columns.

REF_ROWS() - AppSheet Help

Well I have a table call clientes and another call proyectos with a column name cliente.interesado. This is what I'm getting when I either add a virtual or physical column. cliente.interesado column is the enum list type ref. Am i doing something wrong or missing something? @Steve @SkrOYC @Marc_Dillon 

Screen Shot 2022-09-14 at 12.38.44 PM.png

 

You didn't do what Oscar suggested you to do, which is what you should do.


@SkrOYC wrote:

Do a Select() or Filter() witn IN()


 

 

@Marc_Dillon I actually have been trying everything you guys have told me without any luck. I believe I'm doing it wrong. I apologize, but I'm not very good at this. ๐Ÿ˜… 

Screen Shot 2022-09-14 at 12.59.06 PM.png

Screen Shot 2022-09-14 at 1.00.13 PM.png

But hold on, didn't you say that REF_ROWS is the same with more functionality than Select or filter in this case? 

Screen Shot 2022-09-14 at 1.05.07 PM.png

REF_ROWS() estรก pensado para cuando la configuraciรณn es estรกndar, un Ref hacia la tabla parent. De hecho se crean las "Related ..." automรกticamente.

Como estรกs usando un EnumList basetype Ref, REF_ROWS() NO funcionarรก. Debes usar FILTER()/SELECT() y filtrar las filas usando un IN().

Si no lo entiendes del todo, te sugiero familiarizarte con la documentaciรณn antes de seguir haciendo apps, mรกs aun si hacer cosas como las relaciones many-to-many que requieren que entiendas bien lo que estรกs haciendo


FILTER() - AppSheet Help
IN() - AppSheet Help

@SkrOYC I'm using FILTER()/SELECT() without any luck yet. I will keep trying even if i keep failing. I've read all of these documentation you sent me. However still having issues and this is why I ask the community, so it doesn't take me a month to figure it out.

Appsheet it's a place where you can make apps without knowing how to code and this is why i'm trying it. Of course im going to have some bumps on the way, but i eventually think i could make it. 

If everyone that just read the documentation and can go ahead and make an App without any bumps here and there, then the help community wouldn't exist.  But it does.

Y yo no estoy haciendo apps, estoy intentando hacer 1 app para mi.

@SkrOYC  I'll keep reading and studying the material you've sent me. Maybe this is a dumb question that everyone should know. Ignore my question. ๐Ÿ˜‚

When I get it right, I'll come back here and post the solution.


@casitasrd wrote:

If everyone that just read the documentation and can go ahead and make an App without any bumps here and there


Yo encontrรฉ la comunidad y me unรญ unos 8 meses despuรฉs de comenzar con AppSheet y la documentaciรณn fue siempre la fuente de la verdad, y sigue siรฉndolo hoy. Aprendรญ un montรณn.



@casitasrd wrote:

Y yo no estoy haciendo apps, estoy intentando hacer 1 app para mi.


Me refiero a exactamente lo mismo


Debes usar IN() en lugar de una comparaciรณn simple del tipo [Esto]=[_Thisrow].[EstoOtro]

 

@SkrOYC can you give me an example on how to use and IN() inside of a SELECT()?

First, I'm more inclined to use FILTER() which is the same as using a SELECT() when it's pointing to the key column of the respective table.

FILTER() - AppSheet Help


Second, some expressions that return a list of values has an argument that is evaluated on each row to decide if a row is going to be considered or not (so the expression should return yes/no), that's the case of FILTER() and SELECT().

SkrOYC_1-1663181716089.png


Third, IN() return yes if the item (the first argument) is inside the list (the second argument)

SkrOYC_2-1663181728858.png

@SkrOYC I did it! See, sometimes we just need a little push. You just save me a whole week, probably weeks of being miserable by not getting this. ๐Ÿ˜‚ My brother Thank you!

At one point you have to lose the manual and get your hands dirty.

@SkrOYC do you know why its says "Note: This expression could impact performace"?

Screen Shot 2022-09-14 at 3.01.55 PM.png

Screen Shot 2022-09-14 at 3.04.24 PM.png


@casitasrd wrote:

do you know why its says "Note: This expression could impact performace"?

 


Some expressions apply "brute force" to filter, this is one of them. SELECT() and similar check the whole table each time they are calculated, so they are expensive... use with care if a virtual column is needed

Is there a way to do the same without the use of "brute force"'s expressions?

Nope. It's not bad, just use with care

Got it. Thank you sir. I appreciate your help

Top Labels in this Space