Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ludmillab
Contributor II
Contributor II

How to call .NET SDK call on GetLayout() with delta = true

How do you do this: https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/EngineAPI/Content/Sense_EngineAPI/Wor... but with the .NET SDK instead?

It says "You need to set the delta member to true in the request object". But how do I do this with .NET?

 

 

var genericObject = app.GetObject<GenericObject>(cell.Name);
genericObject.GetLayout();

 

 

 

2 Replies
ludmillab
Contributor II
Contributor II
Author

Ok, I found this: https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/NetSDKAPIref/Content/Qlik.Sense.JsonR... .

Just need to figure ouit how to use it in the method call in .NET.

Øystein_Kolsrud
Employee
Employee

The SDK does not have native support for handling deltas, but it is possible to make the calls based on that request constructor you linked to. The trick is to manually create the Request instance and use the generic SendAsync to send it to the engine like this:

var req = new Request(genericObject.Handle, "GetLayout", true, null);
var rsp = app.Session.SendAsync<Qlik.Sense.JsonRpc.Response>(req).Result;

The creates and sends a request with the "delta" argument set to "true". Dealing with the response is not straight forward though, but you can treat it like a JArray if you do like this:

var deltas = (JArray) rsp.Result("qLayout", t => t);