Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
catalin
Partner - Contributor III
Partner - Contributor III

Field API - ClearAsync() freezes indefinitely

Hello!

I am iterating through 80 distinct field values and clearing and applying selections for each.

The code is as follows:

 

Log.Information("Getting the report for: {0} = {1}", iteration_field, user)
Log.Information("Getting field {0}", iteration_field)
Dim f = app.GetFieldAsync(iteration_field)
f.Wait()
Log.Information("Clearing current selections...")
Dim field = f.Result
Dim r = field.ClearAsync()
r.Wait()
Log.Information("Applying selections...")
Await app.GetFieldAsync(iteration_field).Result.SelectAsync(user, True)
Log.Information("Selections for the current export are: ")
Dim currentSelection = Await app.GetCurrentSelectionAsync()
For Each selectedField In currentSelection.Layout.SelectionObject.Selections
Log.Information("Camp: " & selectedField.Field)
Log.Information("Valori selectate: " & selectedField.Selected)
Next

 

 

The execution always freezes here:

 

Dim f = app.GetFieldAsync(iteration_field)
f.Wait()
Dim field = f.Result

 

 But it does that in a strange way. In the first run, it freezes after 15 to 20 selections. Then at the second run goes on for 10 more GetField / Clear cycles. And so on until it finishes all. At each subsequent run, it runs very fast until the last freezing point, then it starts running slowly until eventually, invariably, freezes again at some random point.

The resources ( RAM / CPU ) are within normal limits.  

Does anyone have any idea of why is this occurring? Any guidance will be appreciated.

 

Thanks.


C

Labels (3)
0 Replies