Multiple nested select in template

Hi there

I’ve been struggling, looking deeply in articles and post…cannot get out of this (I suspect I need to take a step back :sweat_smile: )

I want to nest multiple select expression, I cannot get something that make sense in the output.
Here is the expression:

<<Start: SELECT(Employes[Barcode Employe],ISNOTBLANK([Related Fiche_Heures By Related_author][numSemaine]))>>
   [Nom Employe]:<<[Nom Employe]>>
   <<Start:[Related Fiche_Heures By Related_author]>>
      [numSemaine]:<<[numSemaine]>>, [Label_FH]:<<[Label_FH]>>
   <<End>>
<<End>>

I’m OK with the first Start Statement.
In my examples, I’m supposed to get multiple output with the nested statement:

   <<Start:[Related Fiche_Heures By Related_author]>>
       [numSemaine]:<<[numSemaine]>>, [Label_FH]:<<[Label_FH]>>
   <<End>>

As I can see it in the app, I get this:
image
But in the output, I get this: (same employee shown here)
image
If I’m correct, I should see multiple lines with:
numSemaine:14,
numSemaine:15,
numSemaine:16

Do you have a clue on what I’m getting wrong ?

Use it in a table rather than just plain text and then just set borders to white so you can’t see it

1 Like

Hi @AlexM

Thanks for your idea.
I don’t think this is a matter of table or border, I was more thinking about a matter of expression.
I’ve been developing the expression further since, and the result does not vary wether I use a table or not.

As you can see here, I used some table in another nested SELECT

The following nested SELECT expressions work as expected, it’s just the first one that does not work but I cannot get why.

Do you have another lead to follow ?

1 Like

Are you not missing a dot here?

1 Like

No, because I want to get all the related items from this children list.

In my Employee table, [Fiche_Heure by Rekated_author] is a list of Ref to table Fiche_Heure, and I want to get the values from the column [numSemaine].

But this is a really good point: actually while I kept working on it, I changed it to:
<<Start: SELECT(Employes[Barcode Employe], ISNOTBLANK([Related Fiche_Heures By Related_author][Related Detail_Jours]))>>
In order to get a list of “list of ref”.
…that may the source of my issue…I remember I had problems with this kind of configuration in the past.
I will work on it and let you know.
Thanks for pointing this out !

2 Likes

but to deref you need a dot or there’s something I’m missing

[RefColumn].[Desired column from ref table]

Actually, if my understanding is correct, this is true when I want to call, let’s say for a children table:
[Parent].[hairColor]

But in my case, this is the reverse path I want to do:
[related children][relatedGrandChildren]

3 Likes

I need to try it. I have never used it.
We learn something new every day :smiley:

2 Likes

@Steve,
I take the liberty to poke you here, as you are a well-known expression-monster :slight_smile:

Do you have any idea on how to make these input/output to match ?

2 Likes

This could be a problem:

image

image

They’re different.

2 Likes

@Steve
Thanks for your help.
Yes, actually I re-wrote it for the post purpose but they definitely match.
Here is the actual current (simplified) formula:

<<Start: SELECT(Employes[Barcode Employe], ISNOTBLANK([Related Detail_Jours By Related_key_Employe_auteur]))>>
   [Nom Employe]:<<[Nom Employe]>>
   <<Start:[Related Fiche_Heures By Related_key_Employe_auteur]>>
      Label_FH <<[Label_FH]>>
   <<End>>
<<End>>

And its output:
image
And informations as seen in the app, for the first one from previous picture:
image

EDIT:
I just added the key to make sure, I get this:
image
It looks like it’s only catching the first ref in the list ?

1 Like

That is odd. What happens if you enter the inner expression:

[Related Fiche_Heures By Related_key_Employe_auteur]

as the App formula for a virtual column in the Employes table and use the Test feature in Expression Assistant?

And the same happens when I click on View Data from Employees Table.


Incomprehensible.

Getting crazy :rofl:

1 Like

Please post a screenshot of the complete expression for the [Related Fiche_Heures By Related_key_Employe_auteur_ column.

EDIT
And the column setting, in table Fiche_Heure:

1 Like

Odd! I have no explanation for this behavior, so I’m going to have to refer you to support@appsheet.com.

1 Like

Hi @Steve @AlexM,

So, after investigation and contact with @Oleg_Andrusenko from Support, here is the solution:

  1. This is not because I use to see information on top of the View Data panel, that there is no data at all when I don’t see it.
    Because of various related children for my entries, I had to scroll dooooooown in order to find the first entry. I could have seen it if I had scrolled on the right end, but because it was after many hours of unsuccessful tries with the nested Start/Select issue, I got tired and forgot the basics :sweat_smile: Beginner’s mistake !
    The tip: look at the size of the scrollbar: tiny, tiny, tiny ! :wink:


    I don’t know if this features already exists, but it could be interesting to displays an alert “no result to show” or something similar. I will look if a feature request have been made about that.

  2. With the “Test” feature :
    Because I wanted to save time on testing, I did not develop the workflow entirely, just firing it with the test button after refreshing, in order to test if my template was correct.
    A try/fail method.


    The “Execute” button in the Test panel fails to correctly develop nested Start/Select.
    That’s a bug, that won’t be fixed if I’m correct.
    BUT when I try to fire it on “normal behavior”, which means trigger it from a change on my table, the workflow produces the expected result ! thumbsupparrot
    Thanks @Oleg_Andrusenko for suggesting that basic try ! :smiley:

image

By the way: do someone know another method to test Template structure ?
Once again, thank you all for your help on it !

3 Likes

Thanks for the write-up!

2 Likes