Workflow/report merge failure: I get this err...

expressions
(Keith Winston) #1

Workflow/report merge failure: I get this error buried in my log when I try to run my Report with my Template: Error: Workflow rule ‘Violations Printout’ field ‘Attachment’ expression ‘SELECT(Properties[BlitzKey])’ is invalid due to: SELECT has invalid inputs.

Error: Workflow rule ‘Violations Printout’ Start expression ‘SELECT(Properties[BlitzKey])’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.

So, BlitzKey is the key column of the Properties table. I can’t figure out what’s going on here? Any ideas? I’m not getting any output. I’m aiming for a (currently blank) email with an attachment (that is, I have no email template, only an attachment template on the report. Thanks!

(Keith Winston) #2

In case it’s not obvious: I’m brand new to both reports/workflows, AND templates. But I copied from Order Capture, and simplified all the way down to just the first couple fields, and still got this. I tried <<Start:Select(Properties[BlitzKey}, true, true)>> and I tried <Start:Properties> (I think that was it) – anyway, since I’ve never gotten it working I don’t know what to try next. Thanks for any help. Sorry for length here…

(Aleksi Alkio) #3

In this last post you typed… Select(Properties[BlitzKey}, true, true) where it should be Select(Properties[BlitzKey], true, true) but I believe that } is just a typo error in here. Correct?

(Keith Winston) #4

I’m a little hazy if I need to put that in brackets: <<Start:TOP([Related Violations [BlitzKey]], 3)>>

or not. It seems like brackets don’t work (I’m a little curious as to why Appsheet would name a field with a name that actually includes brackets?)

(Aleksi Alkio) #5

Then use that name after your Start expression. It’s a filtered list from those options that are related to this record. Please remember that Top only works with OrderBy and cannot be used in isolation.

(Keith Winston) #6

OHHH! I didn’t realize that about TOP, sorry. Thank you.

(Keith Winston) #7

So this is what I just tried: <<Start:[Related Violations [BlitzKey]]>>

And I get (buried in my Log):

"Error: Workflow rule ‘Violations Printout’ field ‘Attachment’ expression ‘[Related Violations [BlitzKey]]’ is invalid due to: Unable to find column ‘RELATED VIOLATIONS [BLITZKEY]’. Error: Workflow rule ‘Violations Printout’ Start expression ‘[Related Violations [BlitzKey]]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table. Error: Workflow rule ‘Violations Printout’ Start expression ‘[Related Violations [BlitzKey]]’ should generate a List of Ref values. Please verify that it generates a List and that the contents of the List are Ref values. Ref values should come from the ‘Key’ column of the referenced table.

(Aleksi Alkio) #8

TOP(ORDERBY(Related Violations [BlitzKey],[OrderColumn],FALSE),3)

(Keith Winston) #9

As I’ve said, the actual field name includes square brackets, which then end up inside other brackets: I’m hesitant to change the field name since it’s autogenerated and I’m not sure if it’s relied on somewhere.

(Keith Winston) #10

This is it now:

<<Start:TOP(ORDERBY(Related Violations [BlitzKey],[PropAddress],FALSE),3)>>

It doesn’t even register a log event. I’ve tried it more than 3 times. No emails.

(Keith Winston) #11

Just to be safe, btw, I’m cutting & pasting that field name.

(Aleksi Alkio) #12

Please take a printscreen from your template.

(Keith Winston) #13

Pretty simple:

(Keith Winston) #14

Yes, sorry, that was just a typo.

(Keith Winston) #15

NOte that I just added brackets around [Related…BlitzKey], I’ve tried with & without

(Keith Winston) #16

Just to be CLEAR: I’ve been assuming << and >> is in fact 2 “less thans” and 2 “greater thans”, not some other kind of secret code I’m supposed to be entering in some other manner?

(Keith Winston) #17

Also, thanks so much for taking this time.

(Keith Winston) #18

Also to be clear: I assumed your “OrderColumn” was to be swapped for a real column?

(Aleksi Alkio) #19

Your expressions seems to be okay. Try to add a virtual column. First add an app formula like [Related Violations [BlitzKey]] and see if it gives you the list.

(Keith Winston) #20

hmm. Well, you gave me the idea of going to the table and “view data” after I added the column. That lead me to believe that the security filter, and/or the hidden status of the key field, was killing me. I changed both those things, reloaded/waited for 5 minutes, and my junky little report is sort of working. Serious progress. I also created another virtual column, but I don’t think that would have done anything (since I didn’t use it): would it have?