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

(Marc Dillon) #1

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.

(Marc Dillon) #2

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.

(Marc Dillon) #4


<<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 ,

“” ,


",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