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

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!

0 28 534
28 REPLIES 28

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…

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?

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?)

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.

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

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.

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

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.

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.

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

Please take a printscreen from your template.

Pretty simple:

Yes, sorry, that was just a typo.

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

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?

Also, thanks so much for taking this time.

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

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.

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?

Your list was probably just empty and that’s why it didn’t bring you anything.

Question: I have a security filter based on a usersetting. Can I get it to ignore that somehow? Should I create a slice that doesn’t include the filter, or vice versa, have the app work off filtered slice and use the full table for the report? I think that security filter was what was killing me. Wow, that was hours and hours.

Have you read this article… help.appsheet.com - Start Expressions in Embedded Templates Start Expressions in Embedded Templates help.appsheet.com

I just skimmed it. I think I’m doing it right (now: I wasn’t at first): I’m using <<Start:[Related Violations [BlitzKey]]>>

Glad you find the correct format whereas the SELECT can be used as well.

Wow, this is tenacious. This is the code, currently, in my app, though I’ve tried dozens of things:

There’s a header too. When I press “Run” (this is a Report: any reason it should be a Workflow?), I get ALL the records (it ignores the TOP) and no field values (PropAddress is non-blank for every record).

As an aside: I seem to have to reload Appsheet for it to read an edited template, is that normal?

What is your virtual column name in the related table? You can use that one for it.

The (automatically named) VC is “Related Violations [BlitzKey]”

Top Labels in this Space