VC Expression based on Child Table returns 0 when value is present

I have a simple virtual column in my Quotes Header table (data type: price) that should display the SUM value of a field (data type: price) in a related table Commissions. According to the client the issue is sporadic. Hereโ€™s the formula:

SUM(SELECT(Commissions[Com Pay],AND([Sales Rep]=[_THISROW].[Assigned to],[Quote]=[_THISROW].[quote_id])))

-The expression returns no errors
-Confirmed there is a value in the Com Pay field
-Confirmed Quote Assigned to = Commission Sales Rep
-Confirmed Quote quote_id = Commissions Quote

Is there another dependable way of writing this expression?

Thank you

0 7 179
7 REPLIES 7

Steve
Platinum 4
Platinum 4

Maybe this instead?

SUM(SELECT([Related Commissions][Com Pay],[Sales Rep]=[_THISROW].[Assigned to]))

Ok it looks like it worked. Weโ€™ll keep an eye on it and see if its stable. I had used the table reference since I had Related table issues on email templates fingers crossed.

A million thanks again

No luck! Looks like another 0 result

3X_6_2_621e63fec15ff5b01f2515c499d65274d24af504.png

I suspect it is not a worflow/template problem, but problem in your expression.

Are you sure

expression is actually returning value if you push the expression in VC?

The issue is sporadic. In my last test using this expression the field did generate a value. This is the expression in place now but the client reports still a 0 value but again only on some notifications - not all.

I think itโ€™s time to engage support@appsheet.com on this. Iโ€™d love to know what they come up with!

Thanks Steve, Aleksi is checking it out.

Thanks again for the help

Top Labels in this Space