Workflow errors - expression refers to undefined field

What exactly does this error mean? Im using a google doc template and copied the column names exactly and have them inside << >>.

Not sure how to troubleshoot these error messagesโ€ฆthe documentation online is not helpful.

0 11 1,079
11 REPLIES 11

Steve
Platinum 4
Platinum 4

What is the complete text of the first three error messages?

โ€œErrorsโ€: โ€œError: Workflow rule โ€˜Weekly Revisions Reportโ€™
action โ€˜Action 1โ€™ Attachment template. Expression โ€˜BEFORE Role Assignmentโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Requested Change BEFORE Roleโ€™
is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜BEFORE Shift Assignmentโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule
โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Requested Change BEFORE Shiftโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression
โ€˜DURING Role Assignment (-12 PRE +24 PST)โ€™ is invalid due to: Arithmetic expression โ€˜(โ€œ12 PREโ€+โ€œ24 PSTโ€)โ€™ has inputs of an invalid type โ€˜Unknownโ€™. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Requested
Change DURING Roleโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜DURING Shift Assignmentโ€™ is invalid due to: Expression refers to undefined field.
Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Requested Change DURING Shiftโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment
template. Expression โ€˜AFTER Role Assignment (+24 HRS PST)โ€™ is invalid due to: Unable to find function โ€˜AFTER ROLE ASSIGNMENTโ€™. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Requested Change AFTER Roleโ€™ is
invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜AFTER Shift Assignmentโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly
Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Requested Change AFTER Shiftโ€™ is invalid due to: Expression refers to undefined field. Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜Review
Statusโ€™ is invalid due to: Expression refers to undefined field.โ€,

2X_1_111d7a5ce67990ed64b93decaf9c1c7dc73b0a3c.png

If i run the report on row instead of table (removed start and end) those fields arent an issue but i really want one report on the entire tableโ€ฆ

Thanks for the details! Letโ€™s focus on this one first:

Error: Workflow rule โ€˜Weekly Revisions Reportโ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜BEFORE Role Assignmentโ€™ is invalid due to: Expression refers to undefined field.

The error refers to the attachment template for Action 1, to an expression within the template that refers to BEFORE Role Assignment. Please post a screenshot of the template that includes the BEFORE Role Assignment reference.

I was able to get the report to work and those errors went away - moved the start and end expressions outside the table. Now my issue is trying to get comments from the child table onto the same report. Iโ€™ve tried the following at the end of the table but
it doesnโ€™t work: ** <<Start:SELECT([Related Everbridge Role rpt for Dept Review Comments][Comment], ([EverbridgeID] = [_THISROW].[Contact
External Id]), TRUE)>>**

Right now I canโ€™t access the community forum from my work computer so Iโ€™m having trouble getting screen captures posted. IT security is looking into the issue.

2X_1_111d7a5ce67990ed64b93decaf9c1c7dc73b0a3c.png

The <<Start>> expression must always produce a list key column values from the table you want to work with; it cannot produce any other type of value. So in this case:

<<Start:SELECT([Related Everbridge Role rpt for Dept Review Comments][row-key], ([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)>>

replacing row-key with the name of the key column for the table containing the comments. Them, within your template, just refer to the column you want: [Comment].

I tried it two ways - get errors (see below). Is there a way I can test the expressions outside of the report workflow to see if they work?

[CommendID] is the key for the comments table.

[EverbridgeID] is the ref col for the comments table.

[Contact External Id] is the key for the main table

<<Start: SELECT([Related Everbridge Role rpt for Dept Review Comments][CommentID], ([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)>>

Comments: <>

<>

โ€œErrorsโ€: โ€œError: Workflow rule โ€˜Weekly Revisions Report 2โ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜SELECT([Related Everbridge Role rpt for Dept Review Comments][CommentID], ([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)โ€™ is invalid
due to: Error in expression โ€˜[_THISROW].[Contact External Id]โ€™ : Unable to find column โ€˜_THISROWโ€™. Error: Workflow rule โ€˜Weekly Revisions Report 2โ€™ action โ€˜Action 1โ€™ Attachment template. Start expression โ€˜SELECT([Related Everbridge Role rpt for Dept Review
Comments][CommentID], ([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)โ€™ 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.โ€,

<<Start: SELECT(Everbridge Role rpt for Dept Review Comments[CommentID], ([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)>>

Comments: <>

<>

โ€œErrorsโ€: โ€œError: Workflow rule โ€˜Weekly Revisions Report 2โ€™ action โ€˜Action 1โ€™ Attachment template. Expression โ€˜SELECT(Everbridge Role rpt for Dept Review Comments[CommentID], ([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)โ€™ is invalid due
([EverbridgeID] = [_THISROW].[Contact External Id]), TRUE)โ€™ 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.โ€,

2X_1_111d7a5ce67990ed64b93decaf9c1c7dc73b0a3c.png

Thank you Steve! Lots of trial and error but I think itโ€™s working now!

2X_1_111d7a5ce67990ed64b93decaf9c1c7dc73b0a3c.png

Well done!

How can I get the text from the comment field to display instead of the comment ID? comments is a related table to the main table where the other info is coming from.

2X_1_111d7a5ce67990ed64b93decaf9c1c7dc73b0a3c.png

I think i figured out my problemโ€ฆonce i moved the start and end expressions outside the table it worked. No errors.

Top Labels in this Space