Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

8 Replies
prabhuappu
Creator II
Creator II

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
Author

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
Author

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
Author

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
Author

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
Author

Yeah - that's made a difference!

Thanks.

corchi72
Partner - Contributor III
Partner - Contributor III

this works!!!!!

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

corchi

Not applicable
Author

Yes, it does with 1.0.2.

It certainly doesn't with 1.0.0 of the SDK.