BUG: Template START expression duplicates content when using IN() statement

We yet to have direction on how to post Bugs, so I am doing it this way....  Title starts with "BUG:"  add tag of "Errors"

**********************************

Consider the following.

Question Category Table Data:

Screen Shot 2022-02-20 at 3.44.36 PM.png

Template START expression

<<START: ORDERBY(SELECT(Question Category[Category ID], IN([Category ID], {“9CB05501”,“9CB05501”})),[Order])>>
...
<<END>>

 The content inside of the START/END block is repeated based on the number of times the comparator matches items in the list.  In the example above, as is, the block content is repeated twice because the ID appears hardcoded twice in the provided list.  If I write a list expression, inside the IN() function, that returns 8 rows with the same Category ID value, the content is repeated 8 times. 

This is obviously a bug since the there is only a single Question Category table row that matches.  

The workaround is....to write a SELECT() expression to allow for eliminating duplicates.

2 4 154
4 REPLIES 4

I'm confused about where to post bugs to also.  And, when I send them to support, I sense less interest that in the past.  Am I the only one who feels that, as AppSheet has grown (or become more like Google), it has become less responsive?

I'm still a fan and since I'm on the free plan I'm getting way more than I pay for, but, nonetheless, I'd be curious to know if others have detected a change in this regard.

Hi, may I ask what that formula would be then?

Hi Aleksi!  I haven't seen your name in here for a while now!  Good to see you active again.

I think you might misunderstand the post.  The issue isn't with the expression.  It is with the execution of the expression.  

The content within the START/END is executed TWICE when there are two items that are matched in the IN() function list.  The SELECT should return the matching row only once regardless of how many time the matching ID appears in the IN() function list.  Thus, it is expected that the content appears in the generated Doc only once. 

I'm sure if you implement a similar template you'll see the behavior I'm referring to.

I do understand the issue. But I would like to see how have you written the list inside of an IN() as you wrote. I mean this part.. " If I write a list expression, inside the IN() function," As you know there are so many different ways to write it and I would like to use exactly the same syntax with a test.

Top Labels in this Space