Qlik Community

QlikView Extensions

Discussion Board for collaboration on QlikView Extensions.

Not applicable

Extension: Read Forumla of a Textbox

Hey,

is it possible to read the formula of a simple textbox. I created a textbox with sum(ID). Now I want to build a easy Extension which gives back this formula. The ID of the textbox is -> TXT01.

Qv.AddExtension("HelloWorld2",

            function () {

                //this.Element.innerHTML =  TX01.text.value;

                this.Element.innerHTML =  document.getElementsById('[TXT01]').value;

});

Thomas

1 Reply
Partner
Partner

Re: Extension: Read Forumla of a Textbox

I think you should try something like this within your function.

var doc = Qv.GetCurrentDocument();
var txtObj = doc.GetObject("TXT01");
this.Element.innerHTML = txtObj.GetText();

I haven't tested it but should be close to what you need.

Hope that helps.