Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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.