Help with SELECT statement I'm trying to rep...

expressions
(Autumn Steinert) #1

Help with SELECT statement

I’m trying to replace a spreadsheet SUMIF formula with an APPSheet Sum(SELECT) statement, but I’m having some trouble.

When I put the statement in AppSheet, it verifies the statement as correct and values will show up when I Test, but when I set preview the app no values are shown.

My statement is: =SUM(SELECT(BOLs[Incoming Amount],AND([_THISROW].[Lot #]=[Lot #],[_THISROW].[Packaging]=[Packaging])))

Its intent is to sum the quantity of product received.

So the BOLs table has a list of individual deliveries.

The table containing this expression contains a unique list of product that should summarize the values.

This expression is supposed to go to the BOLs table and sum the values where Lot # and Packaging match what is on this row so I get a total.

Can anyone see why my expression isn’t displaying correctly?

It passes the Verify and when I TEST it produces values, but it won’t display them in the app preview.

(Jason Denniston) #2

Try: SUM(SELECT(BOLs[Incoming Amount],AND([Lot #]=[_THISROW].[Lot #],[Packaging]=[_THISROW].[Packaging])))

(Autumn Steinert) #3

@Jason_Denniston Thanks for the response.

I gave that a try and got the same results – it passes “verify”, “test” produces the correct results, but it will not preview in the app.

(Jason Denniston) #4

@Autumn_Steinert Preview in the app on your phone or the simulator?

(Autumn Steinert) #5

@Jason_Denniston In the simulator (on the desktop)

(Jason Denniston) #6

How does it look on your phone?

(Jason Denniston) #7

If it looks ok on your phone, I would notify AppSheet or get a hold of a moderator in this community and notify them as this is, most likely, a bug in the simulator. I’ve only been playing with this for 3 weeks and have noticed a few bugs here and there.

(Jason Denniston) #8

Also, make sure your data types aren’t conflicting as I’m sure they aren’t…but just double check to make sure.

(Tony Fader) #9

@Autumn_Steinert Maybe the column isn’t being included in your view’s column order setting? Or if you’re using a slice, maybe your virtual column isn’t included in the slice?