Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

SharepointList-OLE DB or ODBC error: [Expression.Error] We cannot convert the value "" to type Table

Hi all,

 

I have the following problem, when expanding a field of a Sharepoint List it shows me the data in Power Query but then when I want to save the changes it tells me the following:

The code in M is as follows:

let
Source = SharePoint.Tables("https://test.sharepoint.com/sites/test", [Implementation="2.0", ViewMode="All"]),
#"8c26c774-bd75-4ca4-9b9b-2cef301f2b93" = Source{[Id="asdc774-bd75-4ca4-9b9b-2casd93"]}[Items],
#"Expanded Business Processes" = Table.ExpandListColumn(#"asdc774-bd75-4ca4-9b9b-2casd933", "Business Processes"),
#"Expanded Business Processes1" = Table.ExpandRecordColumn(#"Expanded Business Processes", "Business Processes", {"lookupId", "lookupValue", "isSecretFieldValue"}, {"Business Processes.lookupId", "Business Processes.lookupValue", "Business Processes.isSecretFieldValue"}),
#"Expanded Created By" = Table.ExpandListColumn(#"Expanded Business Processes1", "Created By"),
#"Expanded Created By1" = Table.ExpandRecordColumn(#"Expanded Created By", "Created By", {"id", "title", "email"}, {"Created By.id", "Created By.title", "Created By.email"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Created By1",{{"Created By.title", type text}, {"Created By.id", type text}, {"Created By.email", type text}}),
#"Expanded Assigned To" = Table.ExpandListColumn(#"Changed Type", "Assigned To"),
#"Expanded Assigned To1" = Table.ExpandRecordColumn(#"Expanded Assigned To", "Assigned To", {"id"}, {"Assigned To.id"})
in
#"Expanded Assigned To1" 

 

 Does anyone know how it can be solved?

Thanks!

Regards!

1 Reply

  • Use Value.Is to probe what the contents of the cell will be,  or utilize the try ... otherwise ... approach.