Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Expression.Error: We cannot apply field access to the type Function

Hello,

 

I am trying to pull the custom logs out of the Project Sites in PWA but i keep getting the error message;

 

Expression.Error: We cannot apply field access to the type Function.
Details:
Value=[Function]
Key=ProjectWorkspaceInternalUrl

 

Does anyone know where I am going wrong?

 

let
Source = OData.Feed("https://theermgroup.sharepoint.com/sites/PWA-IT-PMO/_api/ProjectData/Projects()?$Filter=ProjectType ne 7"),
#"Removed Other Columns" = Table.SelectColumns(Source,{"ProjectName", "ProjectWorkspaceInternalUrl"}),
#"Added Custom" = Table.AddColumn(#"Removed Other Columns", "Custom", each ProjectStatusUpdateData[ProjectWorkspaceInternalUrl]),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "ProjectStatusUpdate"}}),
#"Added Custom1" = Table.AddColumn(#"Renamed Columns", "Custom", each IssueData[ProjectWorkspaceInternalUrl]),
#"Renamed Columns1" = Table.RenameColumns(#"Added Custom1",{{"Custom", "IssueData"}}),
#"Added Custom2" = Table.AddColumn(#"Renamed Columns1", "Custom", each ActionLog[ProjectWorkspaceInternalUrl]),
#"Renamed Columns2" = Table.RenameColumns(#"Added Custom2",{{"Custom", "ActionLog"}}),
#"Added Custom3" = Table.AddColumn(#"Renamed Columns2", "Custom", each RiskLog[ProjectWorkspaceInternalUrl]),
#"Renamed Columns3" = Table.RenameColumns(#"Added Custom3",{{"Custom", "RiskLog"}})
in
#"Renamed Columns3"

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    The each operator requires a function after the "each" syntax. A Table[ColumnName] won't work. If you are trying to get each row value from a different table, how does the code know WHICH row to add where? You are better off using Table.Join or Table.FindText(OtherTable, "Text To Find").

     

    --Nate

  • What is "RiskLog"? I don't see it appear before the last couple of steps.