Filter on Report template

Hi,

I need your help, guys. I created a bot to send a weekly report. On the template, I need to display all the details created by me. I used this formula :

<<Start: ORDERBY(Filter(โ€œP3 Demandsโ€, (USEREMAIL() = [Initiator])), true)>><<[Demand ID]>>but unfortunately, itโ€™s not working. I received the email, but the display in the template is not what Iโ€™m expecting.

[Initiator] - this is the column where I log the email address of the user.

0 10 764
10 REPLIES 10

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Cyrine_Mae_Mendoza

I isolated this for understanding purpose:

ORDERBY(
  Filter(โ€œP3 Demandsโ€, 
    USEREMAIL() = [Initiator]
  ), 
  true
)

I think ORDERBY() is not used properly.
You should indicate a column to โ€œorder byโ€
Syntax is:
ORDERBY( row-keys , sort-key [ , descending-order? [ , sort-key ] ]โ€ฆ )

Please see also:

Any suggestion here, please.

It seems thereโ€™s already been a suggestion by @Aurelien that you havenโ€™t responded to in any wayโ€ฆ

It would help if you included a screenshot of the actual email that came, as well as a description of what youโ€™re expecting.

Hi Marc,

Iโ€™ve checked the recommendation by Aurelien, but I think it is not the answer to my query.

To give you context on what I want to achieve with this email notification, I want to send a weekly report to the [Initiator] (the one who added a project on the application; email column type), containing all of the projects he created. The formula that I constructed was valid with no error but not working as expected.

The email I received with this formula (<<Start: ORDERBY(Filter(โ€œP3 Demandsโ€, (USEREMAIL() = [Initiator])), true)>><<[Demand ID]>>) is blank instead of displaying all the projects under my name.

Please see the below image for your reference.

Hi @Cyrine_Mae_Mendoza,

What happens if you remove the ORDERBY expression ?
<<Start:Filter(โ€œP3 Demandsโ€, (USEREMAIL() = [Initiator]))>><<[Demand ID]>>

It returns blank email content.

Ok, then maybe it could be interesting to start here.

Filter(โ€œP3 Demandsโ€, 
  (USEREMAIL() = [Initiator])
)

Can you check this expression gives a result, on a Virtual column for example ?

Still blank. But I noticed something weird upon clicking the โ€œtestโ€ button. I have here 2 execute buttons. When I click the process execute button, I received blank email content while upon clicking the run task execute button, I received the correct email content.

I tried also clicking the โ€œrunโ€ button and I received the blank email content. Itโ€™s weird.

Hi @Cyrine_Mae_Mendoza

Itโ€™s weird, indeed.

Iโ€™m almost repeating myself, but in such case, I would try to identify step by step where the process fails.

Here, first step would consist in creating a virtual column anywhere, set the FILTER expression in, and test the expression directly from the formula editor panel, as you can see it here:

Did you try this ? If so, can you share what you get ?

EDIT : Iโ€™m aware that it could be redundant if you say the second button gives the expected outputโ€ฆItโ€™s more for making sure that is not a cause of your issue

Bot Tasks are executed on the server, which means the USEREMAIL() is not returning your email. Youโ€™ll need to supply that variable another way, like from the record that the Event is triggering on.

Top Labels in this Space