Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

.NET SDK GetTable giving me unexpected results

Hi,

I have a sheet, let's say its ID is 'hseUuw'.

I have a table on that sheet. let's say its ID is 'zBxhpPX'.

var existingTable = app.GetSheet("hseUuw").GetTable("zBxhpPX");

existingTable is not null.  But when I look at its properties in the Visual Studio debugger, they are all throwing an exception of type 'System.NullReferenceException'.

I wanted to look at its properties... but that is null.

Does anybody know why?

Thanks,

Shane.

Tags (2)
1 Solution

Accepted Solutions
Not applicable

Re: .NET SDK GetTable giving me unexpected results

Hi,

It looks like you are using version 1.0.0 of the .Net SDK? In the .Net SDK 1.0.0 there is an error when deserializing tables. I recomend that you uppgrade to version 1.0.1 or 1.0.2 of the .Net SDK.

// Lars-Göran Book

8 Replies
prabhuappu
Contributor II

Re: .NET SDK GetTable giving me unexpected results

hi,

try to read its property by creating one more variable instead of reading it while debugging.

var property = existingtable.properties;

regards,

Prabhu appu

Not applicable

Re: .NET SDK GetTable giving me unexpected results

Hi,

thanks for your reply.  Are you saying that the Visual Studio Debugger isn't working correctly?

As expected, doing this:

var existingTableProperties = existingTable.Properties;

results in a null value for 'existingTableProperties'.

Regards,

Shane.

Not applicable

Re: .NET SDK GetTable giving me unexpected results

Hi,

the .Net SDK is "lazy" which means that the data will be fetched when you access it thats why youexperience your problems when debugging.

If you want to look at the properties you must access the properties.

var title = existingtable.Properties.Title

You can also force the SDK to retrieve these by calling GetProperties() and GetLayout().

// Lars-Göran Book

Not applicable

Re: .NET SDK GetTable giving me unexpected results

Hi,

thanks for your reply.

var existingTable = app.GetSheet("hseUuw").GetTable("zBxhpPX");

var existingTableProperties = existingTable.GetProperties();

var test = existingTable.Properties.Title;

In the code sample above:

existingTable is not null,

existingTableProperties is null

reading property 'Title' throws an exception (because Properties is null)

Regards,

Shane.

Not applicable

Re: .NET SDK GetTable giving me unexpected results

Hi,

It looks like you are using version 1.0.0 of the .Net SDK? In the .Net SDK 1.0.0 there is an error when deserializing tables. I recomend that you uppgrade to version 1.0.1 or 1.0.2 of the .Net SDK.

// Lars-Göran Book

Not applicable

Re: .NET SDK GetTable giving me unexpected results

Yeah - that's made a difference!

Thanks.

corchi72
New Contributor III

Re: .NET SDK GetTable giving me unexpected results

this works!!!!!

var test = (String) existingTable.Properties.Title;

corchi

Not applicable

Re: .NET SDK GetTable giving me unexpected results

Yes, it does with 1.0.2.

It certainly doesn't with 1.0.0 of the SDK.