My workorders app, similar to the Order Captures App template isn’t populating the Related Orders in the reports/emails. I am using the default template. I added a section to see if removing the data from the tables would help and it is the same. I’ve compared the structure with other templates and I can’t identify where it’s going wrong. Any suggestions?
If my understanding is correct, your start expression needs to refer to the Contracts table (presuming one exists). So something like <Start:Contracts><<[Project_ID].[Project_ID]>> or <<Start: SELECT(Contracts[Contract_ID],[_THISROW].[Project_ID]=[Project_ID])>><<[Project_ID]>> may work.
The Order Capture template is the same as the default template, here’s the link
Run task “Send an email”
Error 1 : ‘Handle new Workorders record 2’ task ‘Send an email’ Attachment template. Expression ‘[Contract]’ is invalid due to: Unable to find column ‘Contract’, did you mean ‘Customer’?.
Error 2 : ‘Handle new Workorders record 2’ task ‘Send an email’ Attachment template. Start expression ‘[Contract]’ 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 3 : ‘Handle new Workorders record 2’ task ‘Send an email’ Body template. Expression ‘[Contract]’ is invalid due to: Unable to find column ‘Contract’, did you mean ‘Customer’?
I think there are a couple of ways to pull the data but I’m concerned that something is off if the default template isn’t working with the Related Tables
That looks like it should. One way I test things is using Virtual columns to try the expressions. Try adding a Virtual Column with just [Related Contracts][Project_ID] and click on the TEST option and see if it brings the right information.
The only other thing I can think of is that somehow the values in the column [Workorder_ID] of the CONTRACT table are not exactly the same as the values in the column [Workorder_ID] of the WORKORDERS table. So the <<Start: [Related Contracts]>> it’s not bringing any data since it can’t find the records that it’s pointing to.