Multiple nested select in template

Aurelien
Google Developer Expert
Google Developer Expert

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 )

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:
3X_b_4_b4937df02e5442f20b732becd7d711a98b51e44d.png
But in the output, I get this: (same employee shown here)
3X_6_d_6d8557bb017b5e021cfa853dab87935d820bd4bb.png
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 ?

Solved Solved
0 18 881
1 ACCEPTED SOLUTION

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 Beginner’s mistake !
    The tip: look at the size of the scrollbar: tiny, tiny, tiny !


    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 ! 3X_0_5_0513e84dbad14e1fb20d3661280a326c886be358.gif
    Thanks @Oleg_Andrusenko for suggesting that basic try !

3X_0_f_0f26cd32d2363691d326637ed27e0a992c7069ca.png

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

View solution in original post

18 REPLIES 18

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

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 ?

Are you not missing a dot here?

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 !

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]

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

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

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

Steve
Platinum 4
Platinum 4

This could be a problem:

3X_1_f_1f8f843a453a0c62e46ec4eda5b239d0d5ef3383.png

3X_1_2_1252dc97c445cbf10cc48c0d65adc40f7599f6f8.png

They’re different.

@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:
3X_0_e_0ed56e6205d441fb7549c51e55fdbae5060f0011.png
And informations as seen in the app, for the first one from previous picture:
3X_e_e_ee7a66a832a66b69da71767c4911e187089d0c1f.png

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

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

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:

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

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 Beginner’s mistake !
    The tip: look at the size of the scrollbar: tiny, tiny, tiny !


    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 ! 3X_0_5_0513e84dbad14e1fb20d3661280a326c886be358.gif
    Thanks @Oleg_Andrusenko for suggesting that basic try !

3X_0_f_0f26cd32d2363691d326637ed27e0a992c7069ca.png

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

Thanks for the write-up!

Top Labels in this Space