Forum Discussion
Expression.Error: We cannot convert the value "" to type Table.
Hi Santosh_25
First of all note that you left inside the query the auth token -> don't know if intended - if not, please rotate it.
Second, your web request does NOT return anyting so what do you want to happen in this case?
- Santosh_253 years agoFrequent Visitor
Hi,
I want to handle the empty results from above code. Whenever their is no data in any column then column should give the result like null value.
- v-jingzhang3 years agoCommunity Support
Hi Santosh_25
From your code, "Table1" is always an empty table which doesn't have the table column to be expanded. I think you want to expand the "result1" table right?
If my assumption is correct, you can use below code for "Table1". And replace Table1 with result1 in #"Expanded Column1" step.
= Table.FromRecords({ [Column1 = #table({"hostid", "proxy_hostid", "host", "status", "lastaccess", "ipmi_authtype", "ipmi_privilege", "ipmi_username", "ipmi_password", "maintenanceid", "maintenance_status", "maintenance_type", "maintenance_from", "name", "flags", "templateid", "description", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "proxy_address", "auto_compress", "custom_interfaces", "uuid", "tags"},{List.Repeat({null}, List.Count({"hostid", "proxy_hostid", "host", "status", "lastaccess", "ipmi_authtype", "ipmi_privilege", "ipmi_username", "ipmi_password", "maintenanceid", "maintenance_status", "maintenance_type", "maintenance_from", "name", "flags", "templateid", "description", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "proxy_address", "auto_compress", "custom_interfaces", "uuid", "tags"}))})] })Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.