Orderby Workflow question

Hi There

In my workflow i am trying to order my columns in a report using orderby but for some reason it keeps failing. Sorry i must be really obivous but any help would be appreaicated.

This is my expression
<<Start:OrderBy( [Related Inspections], [Area], TRUE)>><<[<<Start:OrderBy( [Related Inspections], [Area], TRUE)>>

And error returns this on a test every time.

The URL was: /template/showtable?appName=0c5bce53-089c-4f6e-a6d5-f2852f58b7e0&workflowRuleName=Mast%20Inspection%20email&locale=en-GB&tzOffset=-60&location=0%2C%200&settings=%7B%22_RowNumber%22%3A%220%22%2C%22_EMAIL%22%3A%22%22%2C%22_NAME%22%3A%22%22%2C%22_LOCATION%22%3A%22%22%2C%22User%22%3A%22%22%2C%22Option%201%22%3A%22%22%2C%22Option%202%22%3A%22%22%2C%22Country%20Option%22%3A%22%22%2C%22Language%20Option%22%3A%22%22%2C%22Option%205%22%3A%22%22%2C%22Option%206%22%3A%22%22%2C%22Option%207%22%3A%22%22%2C%22Option%208%22%3A%22%22%2C%22Option%209%22%3A%22%22%2C%22_THISUSER%22%3A%22onlyvalue%22%7D

Error sorting references
App name: RPMainApp-513200
App owner Id: 595750
Referenced table: Inspection
Reference values: 5Lxw03TY, hroYpvoe, sG4Rj12S, JvJ1WNw3, rtrO9nOW,
Sort definitions: [Area],

Thanks in advance.

Nick

0 12 680
12 REPLIES 12

Steve
Platinum 4
Platinum 4

This expression is invalid:

<<Start:OrderBy( [Related Inspections], [Area], TRUE)>><<[<<Start:OrderBy( [Related Inspections], [Area], TRUE)>>

Is it a typo?

Sorry Steve its a typo what i texted in the statement is this

<<Start: OrderBy([Related Inspections],[Area], TRUE)>>

What result does Expression Assistant give when you test the expression?

Hi Steve

I get this

Expression โ€˜<<Start: OrderBy([Related Inspections],[Area], TRUE)>>โ€™ could not be parsed due to exception: The given key was not present in the dictionaryโ€ฆ

Try putting just OrderBy([Related Inspections],[Area], TRUE) into Expression Assistant. << Start >> tags are only for use in template files.

comes back with Unable to find column โ€˜Related Inspectionsโ€™

I am trying to use it in a template though ultimately. Do you think i need to put the Key in instead of related inspections?? It just seems strange as the table it relates to does have this as a virtual column so it is there and works as long as i only use start expression with nothing else in my template.

Does your Inspection table have a Related Inspections column?

yes it has this

That screenshot shows that the Related Inspections column is not in the Inspection table. That, then, is your problem: your ORDERBY() expression is incorrectly attempting to use a column in another table.

Try this instead:

<<Start: OrderBy(FILTER("Inspection", TRUE), [Area], TRUE)>>

Hi Steve

I tried that and its just pulling back errors still. The inspections table is a child table of mast inspections and the template is created for mast inspections so in my template i am trying to pull the related inspections through as child records and order them. When i use just the start command with related inspections it all works fine but as soon as i add in orderby it does not. Is that making sense?

I recently had an issue with TOP(ORDERBY(โ€ฆ)) in a template that was fixed.

Please send your problem with details to support@appsheet.com

Thanks for that have just emailed them, Steve thank you for the time as wellโ€ฆ

Top Labels in this Space