cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Pass Text Input widget value to a function in Thingworx Studio

SOLVED
Newbie

Pass Text Input widget value to a function in Thingworx Studio

Hi ,

   i have text input widget and a button.I want to invoke a function getName() on the button click at the same time  i want to pass the textbox value to this function.How can i do it?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Pass Text Input widget value to a function in Thingworx Studio

Are you looking for something like this (check the video and code below):

-----------

$scope.getData = function() {

  var inText = $scope.app.view['Home'].wdg['textInput-1'].text;

  $scope.outputData(inText);

};

$scope.outputData = function(inText){

  console.log('inText is ', inText);

}

------------

Video Link : 1824

View solution in original post

2 REPLIES 2

Re: Pass Text Input widget value to a function in Thingworx Studio

Are you looking for something like this (check the video and code below):

-----------

$scope.getData = function() {

  var inText = $scope.app.view['Home'].wdg['textInput-1'].text;

  $scope.outputData(inText);

};

$scope.outputData = function(inText){

  console.log('inText is ', inText);

}

------------

Video Link : 1824

View solution in original post

Highlighted

Re: Pass Text Input widget value to a function in Thingworx Studio

Thanks Dmitry! it worked.

Announcements
Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection