I keep getting errors about my report template

Hi,
Iโ€™m having issues getting the hang of reports. I am not sure if the report โ€œtemplateโ€ example that is listed here (https://help.appsheet.com/en/articles/961724-reports) is maybe out of date or something, I have the following report template table:
|Serial Number:| <<Start:FILTER(TableName, TODAY() - [Date of Receiving] < 6>><<[Serial No.]>>|
|RMA Number:| <<[RMA No.]>>|
|Date Added:| <<[Date of Receiving]>>|
|Added by:| <<[User]>><>|

Now this is an edited version since before I had <<[TableName].[Column Name]>> however that gave me errors so I thought maybe that was the incorrect syntax and tried without table name, however I still get the same error:

Expression is invlaid due to: error in expression, unable to find column โ€˜TableNameโ€™

0 15 703
15 REPLIES 15

Steve
Platinum 4
Platinum 4

Does you app have a table named TableName?

No, I just replaced it with table name, however I am using the correct table name. I am not sure however if I need to enclose it in brackets or quotation marks

Please post screenshots of your template and of the error message.

Error:
Properties:
{
โ€œAppIdโ€: โ€œe6c0ac06-d33a-4b61-a3b5-244dfbd6445cโ€,
โ€œAppTemplateVersionโ€: โ€œ1.000175โ€,
โ€œRuleNameโ€: โ€œWeekly Report: PERsโ€,
โ€œEventTypeโ€: โ€œScheduledโ€,
โ€œInvokedByโ€: โ€œEditorRunButtonโ€,
โ€œServerโ€: โ€œprodu991100014Tโ€,
โ€œIgnoreSecurityFiltersโ€: false,
โ€œEventMatchโ€: โ€œWorkflow event successfully matchedโ€,
โ€œConditionโ€: โ€œโ€,
โ€œMatchesConditionโ€: โ€œTrueโ€,
โ€œActionNotPerformedโ€: โ€œ4 errors present.โ€,
โ€œActionResultsโ€: โ€œCreated 1 ActionResultsโ€,
โ€œAction Typeโ€: โ€œEmailโ€,
โ€œAction Nameโ€: โ€œAction 1โ€,
โ€œErrorsโ€: โ€œError: Report โ€˜Weekly Report: PERsโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜[Tomcat_PER_TimeData].[RMA No.]โ€™ is invalid due to: Error in expression โ€˜[Tomcat_PER_TimeData].[RMA No.]โ€™ : Unable to find column โ€˜Tomcat_PER_TimeDataโ€™. Error: Report โ€˜Weekly Report: PERsโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜[Tomcat_PER_TimeData].[Date of Receiving]โ€™ is invalid due to: Error in expression โ€˜[Tomcat_PER_TimeData].[Date of Receiving]โ€™ : Unable to find column โ€˜Tomcat_PER_TimeDataโ€™. Error: Report โ€˜Weekly Report: PERsโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜FILTER(Tomcat_PER_TimeData, TODAY() - [Date of Receiving] < 6โ€™ is invalid due to: Expression โ€˜FILTER(Tomcat_PER_TimeData, TODAY() - [Date of Receiving] < 6โ€™ could not be parsed due to exception: Number of opened and closed parentheses does not matchโ€ฆ Error: Report โ€˜Weekly Report: PERsโ€™ action โ€˜Action 1โ€™ Attachment template. Start expression โ€˜FILTER(Tomcat_PER_TimeData, TODAY() - [Date of Receiving] < 6โ€™ 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.โ€,
โ€œEmailToโ€: โ€œdavid_boydston@dkgenr.com,dk.tomcatper@gmail.comโ€,
โ€œEmailCCโ€: โ€œโ€,
โ€œEmailBCCโ€: โ€œโ€,
โ€œEmailFromDisplayโ€: โ€œdk.tomcatper@gmail.comโ€,
โ€œEmailReplyToโ€: โ€œnoreply@appsheet.comโ€,
โ€œEmailPreHeaderโ€: โ€œScheduled rule โ€˜Weekly Report: PERsโ€™ for application โ€˜Tomcat_PERโ€™ invoked at 1/22/2020 10:03:55 AMโ€,
โ€œEmailSubaccountโ€: null,
โ€œEmailSubjectโ€: โ€œโ€˜Weekly Report: PERsโ€™. AppSheet Reporting.โ€,
โ€œEmailTitleโ€: โ€œScheduled rule โ€˜Weekly Report: PERsโ€™ for application โ€˜Tomcat_PERโ€™ invoked at 1/22/2020 10:03:55 AMโ€,
โ€œEmailAttachmentโ€: โ€œName: โ€˜ScheduledReport.pdfโ€™ Archive: AttachAndDoNotArchive FileName: โ€˜โ€™ MIME Type: โ€˜application/pdfโ€™ PageOrientation: โ€˜Portraitโ€™ PageSize: A4 AttachmentByteLength: 0 AttachmentTextLength: 0 PDFCount: 1โ€,
โ€œEmailOtherAttachmentsโ€: โ€œโ€,
โ€œAppTemplateNameโ€: โ€œTomcat_PER-1198592โ€,
โ€œOperationโ€: โ€œWorkflow actionโ€,
โ€œResultโ€: โ€œFailureโ€
}

2X_b_bae4931503cbaf2e1e6e6f580f6de06c887c969b.png

(NOTE: I fixed the missing parenthesis on the FILTER statement, however it tells me this does not generate a list and that Expression โ€˜FILTER(Tomcat_PER_TimeData, TODAY() - [Date of Receiving] < 6)โ€™ is invalid due to: Arithmetic expression โ€˜((TODAY()-[Date of Receiving]) < 6)โ€™ does not have valid input types.

@Tom_Cat
Letโ€™s breakdown your error messageโ€ฆ


Error#1

It seems that you have a de-ref expression [Tomcat_PER_TimeData].[RMA No.] where AppSheet cannot find that [Tomcat_PER_TimeData] column (which is the ref column I believe)


Error#2

It seems that you have a de-ref expression [Tomcat_PER_TimeData].[Date of Receiving] where AppSheet cannot find that [Tomcat_PER_TimeData] column (which is the ref column I believe)


Error#3

You have a missing parentheses in your FILTER expression. Notice the parentheses at the end:

FILTER(
	Tomcat_PER_TimeData,
	TODAY() - [Date of Receiving] < 6
)

Hence; your Start expression shall be:
<<Start: FILTER(Tomcat_PER_TimeData,TODAY() - [Date of Receiving] < 6)>><<[Serial No.]>>


Error#4

Related with Error#3 above, the expression cannot create a list of key values


Can you post a screenshot of your Table Schema for Tomcat_PER_TimeData table?

[Tomcat_PER_TimeData] is a TABLE NAME not a column.
I already added the parenthesis in my EDIT above and it still gives me an error that that expression is invalid

What is the column type for [Date of Receiving]?

[Date of Receiving] Column type is DATE, and actually itโ€™s initial value is TODAY() (for when it is entered)

DateType - DateType produces a result of Duration type but you are evaluating it with a number. Try with this:

FILTER(
	Tomcat_PER_TimeData,
	TODAY() - [Date of Receiving] < "6.00:00:00"
)

Hi LeventK, that seemed to fix one of the many errors Iโ€™m getting. Thank you for your help.
The only confusing part is why it cannot find the columns Iโ€™m asking it to look for.
Table Name: Tomcat_PER_TimeData
Columns I want to display: Serial No. | RMA No. | Date of Receiving | User |

<<Start:FILTER(Tomcat_PER_TimeData, (TODAY() - [Date of Receiving] < โ€œ144:00:00โ€))>><<[Tomcat_PER_TimeData].[Serial No.]>>
putting that syntax of <<[Table Name].[Column Name]>> Doesnt work.
I tried just <<[Column Name]>> but that doesnt work either

@Tom_Cat
What is your table schema/structure that you are trying to generate the workflow template? Itโ€™s hard to say anything without knowing that.

I dont understand your question completely, The table Tomcat_PER_TimeData is from a google spread sheet that contains various columns. There is a keycolumn โ€œTransactionIDโ€ wich has the =UNIQUEID() formula. After that thereโ€™s a bunch of columns with data in various types (text, enum & date mostly). And this is not a workflow issue, or not that I know of. I am trying to get a report template made not a workflow

If Tomcat_PER_TimeData is a table and not a column the this is invalid:

<<[Tomcat_PER_TimeData].[Serial No.]>>

If this doesโ€™t work:

<<[Serial No.]>>

then there is no column named Serial No. in the Tomcat_PER_TimeData table.

Thank you Steve, It seems once the FILTER() issue was resolved it resolved all other issues with the syntax you suggested. I had tried that synax before but I guess the failed FILTER() statement made the other ones fail as well.

Thatโ€™s often how it works and why troubleshooting should always start with resolving the first error in a list of errors. Iโ€™m glad @LeventK and I could help.

Top Labels in this Space