Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
organgrindingmo
Partner - Contributor III
Partner - Contributor III

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.