New Bug Encountered:Very obscure syntax issue

Tried to get the following to work in a template workflow -

<<SUM(Select([Related Materials [Job]][Custom.Invoice],[Custom Item]=TRUE))+SUM(Select([Related Materials [Job]][TOTAL Sale Price],[Custom Item]=FALSE))>>

I wouldnโ€™t work. Issue was that it wouldnโ€™t see [Related Materials [Job]] as a valid column name. When โ€œRelated Materials [Job]โ€ is the exact name of the LIST column that shows related daughter records.

Tried SUM(Select([Related Materials [Job]][Custom.Invoice],TRUE)) in a virtual column to test and it failed too. But as I was messing about with it, for some reason

[Related Materials [Job]][Custom.Invoice] is invalid, yet

[Related Materials [Job]]
[Custom.Invoice] is valid

Seems a carriage return makes all the difference in a VC . In the end I renamed it to [Related Materials], but just though you might want to put this on a list of minor bug fixes.

0 8 320
8 REPLIES 8

Just as a matter of note, special characters should not be included in table or column names.

I would rename โ€œRelated Materials [Job]โ€ to: Job_Materials

And โ€œCustomer.Invoiceโ€ I would rename to Customer_Invoice

Hi Matt

itโ€™s an App Iโ€™ve not really touched in 18months or so. I think that was the old naming convention? But I appreciate your point on the decimal point on column names

Simon

Does the app use the [...][...] dereference construct successfully elsewhere?

โ€œreverse referenceโ€ is what Iโ€™ve heard Praveen call this. Like: [Related Records][Order Total]

Dereference: [Column].[Column] <โ€” notice the dotโ€ฆ IT"S THE ONLY DIFFERENCE!!! (^_^)

That name doesnโ€™t make much sense as nothing is being reversed. Itโ€™s more of a bulk dereference. It would be nice to have an official name for itโ€ฆ

Yes the defref works fine in other sections which dont have square brackets in the name

I would guess, then, that this is a limitation in the expression parser. I would encourage you remove square brackets from column names.

We parse expressions using the EPPlus Excel parser.
Square brackets in a field name can confuse the EPPlus parser.

At one time, we used square brackets when generating the default Reverse Reference name.
We eliminated the square brackets in the default Reverse Reference name for exactly this reason.
If you have square brackets in a Reverse Reference field name and you want to use the field name in an expression, I recommend renaming the Reverse Reference field to eliminate the square brackets.

Top Labels in this Space