Attachment from Bot with SELECT is somehow now empty

For some reason, my bot is no longer producing an attachment with any content in it. I have two tables, artworks and tags, and one of the columns in the tag table is an EnumList of artworks that have that tag applied to them. I created a bot that lets me export a list of all the artworks in the tag as an email attachment and it was working great until something happened (maybe I changed something?) and it no longer sends the content I need in the attachment. Here are some screenshots:

Screenshot 2024-01-12 at 4.19.37โ€ฏPM.png

Screenshot 2024-01-12 at 4.18.50โ€ฏPM.png

Screenshot 2024-01-12 at 4.17.52โ€ฏPM.png

Screenshot 2024-01-12 at 4.17.15โ€ฏPM.png

Screenshot 2024-01-12 at 4.16.56โ€ฏPM.png

I did change the name of the task within the bot at one point, maybe that was the problem? Either way, I reconstructed the entire bot and template and it's still returning an empty list. Anyone have ideas?

Solved Solved
0 7 241
1 ACCEPTED SOLUTION

Based on your column structure, you need to use IN([_THISROW].[Tag],[Tags])

View solution in original post

7 REPLIES 7

It sounds the reason is coming from the IN() expression. If the EnumList is reading values from the key column of your ArtWorks table, it should be IN(ArtWork ID],[_THISROW].[ArtWorks]).

Thanks, I appreciate your input. But somehow I cannot now get this to work, and I'm all jumbled up. I'm really trying to:

  1. For a given string of text (a Tag, for example "Urban landscape")
  2. Search the Artworks table
  3. Looking at the Tags column (a list)
  4. To see if the string appears in a given row (e.g. does this row have the string "Urban landscape" in the comma-separated list of values in the Tags column)
  5. If it does, print the Title (another column in the Artworks table) for this row to the email body and/or attachment file. I'll want to print other things too, but for now I'm just trying to get this one thing to work.

I had this working at one point, but then it stopped working for some reason, and I have now tried a variety of different SELECT statements and can't get any to do what I want. Several seem to work in the Test table (when I hit "Test" for the bot), but then the emails and attachments don't have the data I want to see. Here are some of the SELECT expressions I've tried:

  • SELECT(Artworks[Artwork ID], (IN([_THISROW].[Tag], Artworks[Tags])), TRUE)
  • SELECT(Artworks[Artwork ID], (CONTAINS(Artworks[Tags], [Tag])), TRUE)
  • SELECT(Artworks[Artwork ID], IN(Artwork ID],[_THISROW].[Artworks]))
  • SELECT(Artworks[Artwork ID], IN([Tag],[_THISROW].[Tags]))
  • SELECT(Artworks[Artwork ID], IN([Tag], Artworks[Tags]))

You can tell I'm flailing a bit; any help is much appreciated!

Please take a printscreen from your ArtWorks table (from the editor)

Artworks table:

Screenshot 2024-01-14 at 8.39.20โ€ฏAM.png

Tags table:

Screenshot 2024-01-14 at 8.39.40โ€ฏAM.png

โ€ƒโ€ƒ

Based on your column structure, you need to use IN([_THISROW].[Tag],[Tags])

Yay! That did it. Thank you so much for the help!

You're welcome!

Top Labels in this Space