Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Employee
Employee

Clear/UnClear any field from within an object extension

Hi,

did anybody manage to clear, unclear, lock, unlock any field (by the given field name) from within an object extension?

There are some related methods in the JS API but not what I am exactly searching for:

  • this.Document.Clear() => Clears all Selections
  • this.DocumentMgr.LockSelections() => Locks all fields, but not only a single one
  • this.DocumentMgr.UnlockSelections() => Unlocks all fields, but not only a single one
  • this.Data.ClearSelections() => Clears selections within the underlaying data-table of an extension (based on defined dimensions and measures).

Thanks in advance for your advices and ideas!

Regards

Stefan

1 Reply
Not applicable

Re: Clear/UnClear any field from within an object extension

Hi Stefan,

theoretically you should be able to apply function ClearSelections(), Lock(), Unlock() to specific list boxes as well.

For ClearSelections() it works fine for me, but not for Lock() and Unlock().

var doc = Qv.GetCurrentDocument();

var lb1 = doc.GetObject("LB06");

button.click(function() { lb1.Data.ClearSelections(); });

This is the syntax I used to deleselecting a specific element that was not in the extension objects data table.

Best regards,
Tobias