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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
MarcelMerz
Contributor
Contributor

app.field().getData() Synchron?

 

Hi i`m trying to build a extension where you can select values of a selected Field.

For that i tried to run with the following code.

html += '<select class="field_dropdown_comment_input">';
													
	var selected_Field = this.propsFieldnameDropdown;
	//GET ALL VALUES OF FIELD
	var myField = app.field(selected_Field).getData();
	console.log(myField.rowCount);

	myField.OnData.bind( function(){
		myField.rows.forEach(function(row){
			html += '<option value="' + row.qText + '">' + row.qText + '</option>';
			console.log(row.qText);
		});
	});		
html += '</select>';

My Problem is that app.field().getData() is asynchron. For that reason my HTML Select has no options to select. 

My question is how to solve this problem. I need to get all Values of a Field synchon and display all options in my HTML Select.

 

thank you in advance

 

Labels (1)
1 Reply
Arul_guru
Contributor
Contributor

Hi MarcelMerz ,  

Did you able to solve the issue ? I'm also stuck with the same issue.

Thanks in advance.

Regards,

Arul