SELECT() Notification

Hi, 

Im trying to create notifications for users from table All Staff with the Email condition of Column Access = Yes

SELECT(All Staff[Email], ([Access] = "Yes"), TRUE)

Pretty simple right?

But it doesnt work.

I tried putting manually my email, and it works.

So no issues on my work flow. Just the expression.

Somebody please help. 

 

Tq

Solved Solved
0 10 178
1 ACCEPTED SOLUTION

If your [Access] is a Yes/No type, then you get a "match" either by [Access] or {Access] = "Y" or [Access] = true  (no quotation marks).

So try 

SELECT(All Staff[Email], [Access], TRUE)

(You can always check your expression results by the test function in the editor.)

View solution in original post

10 REPLIES 10


@finkployd wrote:

But it doesnt work.


In what way does it not work?


@finkployd wrote:

I tried putting manually my email, and it works.


What does this mean? You "tried putting manually" your email where?

 

Some things to check

First, if your app is NOT deployed, be aware that any attempts to send notices of any kind will result in the message being sent to ONLY your email address - or more precisely, ONLY to the email address of the App Creator.

If that's not the issue, then know that the expression is syntactically correct.  So the issue is either in definition of the columns or in the data.  Check these things:

  • If you have run the automation, then check the Audit Log for any error messages.  If the bot ran successfully, check the Audit Log for any informative message.  You can find the Audit Log under the Manage tab of the editor.
  • Confirm column type of the {Email] is "Email".
  • Confirm column type of the [Access] column is Yes/No.
  • Verify that the email addresses in the [Email] column are valid email addresses.  Any invalid email address in the list will halt the bot with an error message.

 

If your [Access] is a Yes/No type, then you get a "match" either by [Access] or {Access] = "Y" or [Access] = true  (no quotation marks).

So try 

SELECT(All Staff[Email], [Access], TRUE)

(You can always check your expression results by the test function in the editor.)

You are a life saver. This works. Thank you very much.

And you gave me a solution without even asking too much question. Straight away, you knew what was my problem.

So I might wanna take this opportunity to ask you something as well.

I'm trying to automate pdf file generations using the bots. i'm getting 404 errors trying to open the generated pdf files. but if i copy the app, and try it, i can open it.

just so u know, the owner of the app for the first one is my senior engineer. im just an editor of the app. the files are stored in OneDrive. does it have anything to do with access?

i cant talk to my senior engineer yet cause he's away, so trying to figure this out first.

I have zero experience with OneDrive. However, when files are generated by a bot, they are stored in the App Owner's storage using the App Owner's credential.

When you open files, they have to be stored in either the same folder as your Spreadsheet resides in (Google case, so this does not apply to your case..) or a publicly accessible place. But I guess the folder that the bot creates its files into is not publicly accessible nor by you, therefore you get errors.

This help doc may help you to dig into this in more detail.

https://support.google.com/appsheet/answer/11918256?hl=en

I cannot offer you something definitive, but my guess is it is not because the app is using OneDrive but the files created by a bot are not usually accessible by non-owners of the app.

So if you want to make them available to your app's users, you should move them to a place where they have access to.

Funny you mention that, cause i did actually try to find a loophole in
that.

First i uploaded a file thru the app, hence a folder is created
automatically to store that pdf. Tried opening this thru the link, it works
just fine.

Then i tried to use this folder path instead hoping that i could work
around getting the bot generated files to be uploaded here, hence expecting
it to be opened.

However to no avail still.

So im guessing it has something to do w the app owners credentials.

I guess i just have to wait for my senior engineer to get back to me.

Tq btw!


@TeeSee1 wrote:

If your [Access] is a Yes/No type, then you get a "match" either by [Access] or {Access] = "Y" or [Access] = true  (no quotation marks).


[Access] = "Yes" and [Access] = "true" are both also valid expressions for the Yes/No column.  Just to make it clear to anyone else reading this,  AppSheet will happily accept all variations interchangeably.

Screen Shot 2022-10-09 at 8.43.39 AM.png

 

@WillowMobileSys 

I did more testing. It seems that the Yes/No column's match conditions seem to behave differently depending on where an expression is used.

Inside a SELECT expression, what I have stated looks correct where as (at least) out side SELECT expressions, what you have stated seems correct.

Screen shots of my own tests.

TeeSee1_4-1665324283889.png

select(emps[name],[flag]="true") <= SELECT-Yes (="YES" also returns no results)

SELECT(emps[name], [flag]) <= SELECT [flag]

 

TeeSee1_0-1665323246834.pngTeeSee1_1-1665323279388.pngTeeSee1_2-1665323301870.pngTeeSee1_3-1665323338473.png

 

I see your point and agree.  I think this is bug and I don't think it was this way in the past.

But there is even more strangeness.

When I use a SELECT() to populate an Inline table, the usage of = "Yes" results in a conflict within the view.  The Row Count reflects zero yet the Inline table view still shows rows.   And if I manually adjust the flagged rows, the view continues to show expected number of rows though the count reflects zero.  

I have seen posts in the community like this and now wonder if this Yes/No column in the selection criteria with = "Yes" has been the problem.

When = "Yes" in SELECT(), zero row count and no View button...yet rows are displayed

Screen Shot 2022-10-09 at 1.31.22 PM.png

When = "Y" in SELECT(), all looks normal

Screen Shot 2022-10-09 at 1.29.28 PM.png

More confusion...

I agree with you that this is a bug. This sort of inconsistency causes unnecessary pain and suffering and wasted time....

I hope Google address this or at least document this behavior clearly if they insist on this being a spec, not a bug.

Steve
Platinum 4
Platinum 4

Escalated.

Top Labels in this Space