I have an action button which changes a data ...

I have an action button which changes a data value which triggers a workflow that sends an email.

The email body includes 3 parts.

Part 1 at the beginning of the mail is just simple data value from the row of the table. Part 2 is a fairly complex formula meant to show non-zero data, and not show extraneous zeroes. I do a Start expression over one table, and have a big IF() expression that checks if the SUM() of a SELECT() expression is zero, and displays it if nonzero. The SELECT() expression has some conditional arguments in it which were giving me trouble in another post I made, which I never got a good reply on, but did end up getting it to work finally. Part 3 at the bottom of the mail are some totals value, also simple values from the row of the table.

When I click the action button, the email gets sent with Part 1 and Part 3 displaying correctly, and a blank space in between. If I go to the workflow rule in the editor, click the Test button, then click the Send button, the email gets sent with ALL parts properly shown. I do not understand what could be the difference here.

Through some experimenting, Iโ€™ve found that it is due to the conditional arguments in the SELECT() expression. But how would these arguments be any different from clicking the action button, versus the Test button? They are pretty simple arguments: the value of a column in the SELECT table matching a string, and the value of another column matching the value of the specific row from the Start expression record.

0 5 1,030
5 REPLIES 5

This is the previous post I mentioned. No one seemed to have any thoughts on if the THISROW,THISROW-1 usages were working as expected.

plus.google.com - I need some help with accessing columns in Parent/Grandparent records in a seโ€ฆ I need some help with accessing columns in Parent/Grandparent records in a seโ€ฆ plus.google.com

Itโ€™s hard to give specific advice without knowing the full expression and structure of the tables, but something like a missing [_THISROW] is a common reason for Select not working as intended. If you copy the full expression here maybe someone can spot the problem.

OK

<<Start:RS base beer inventory[Beer]>> << if( sum(select([Products][Amount], AND([Invoice id] = [_THISROW].[id] , [Beer] = [_THISROW-1].[Beer]

, CONTAINS([Size],โ€œ1/2 bbl kegโ€) ) ) ) = 0 ,

โ€œโ€ ,

concatenate("

",sum(select([Products][Amount], AND([Invoice id] = [_THISROW].[id] , [Beer] = [_THISROW-1].[Beer]

,CONTAINS([Size],โ€œ1/2 bbl kegโ€) ) ) ) , "

" , [Beer] , " 1/2s ") ) >> <>

The workflow works on a record of an โ€œInvoiceโ€ table, which contains a list of records in a โ€œProductsโ€ table. โ€œProductsโ€ are specific package dates and container sizes of records in the โ€œbase beer inventoryโ€ table. A single โ€œProductโ€ specifies a reference to a โ€œbase beerโ€, a reference to an โ€œinvoice idโ€, and a container size. The only comparison that seems to work 100% is the checking of the โ€œinvoice idโ€.

By 100% I mean both when testing the workflow, and when clicking the action button (which triggers the workflow). They all work when just testing the workflow.

@Marc_Dillon Thanks, I donโ€™t see anything obviously wrong, but Iโ€™m not very well versed with Start expressions and [_THISROW+/-] either. @Philip_Garrett_Appsh do you see any problem with this?

Two ideas I can think of:

  1. If the action is being triggered from a view over a slice, some column values might be getting dropped from the row when it comes in through the app. 2. Since there are multiple levels of context here (the Start over base beer inventory and then the Select over [Products]), Contains([Size]โ€ฆ) might be looking in the wrong table for Size. I donโ€™t have any idea why that would be different in testing vs through the app though.

@praveen as well

Top Labels in this Space