Empty selected value in SN Record Picker in a Widget

SamuelTse
Tera Guru

Hi,

I basically have two fields on the widget ,which is part of the catalog form, and the form will be used in Service Portal. One field is a dropdown (Type) and the second one is a SN Record picker (Item). The record picker is dynamic. The filter changes based on the value selected in the Type field. All these work perfectly fine.

However, when I select a Type, then select and Item. Now going back to select another Type. the previously selected Item is still on display. I want to remove the selected Item after the Type field changes. It sounds simply but how can i achieve this?

I tried to simply empty the variable, didn't work:

$scope.item = {

  displayValue: "",

  value: "",

  name: 'Item'

  };

Thanks


Sam

1 ACCEPTED SOLUTION

I would suggest changing your controller like this and see if it works:



$scope.loanerItem = {  


  displayValue: "",  


  value: "",  


  name: 'loanerItem'  


};  


 


$scope.updateItem = function(){  


  $scope.loanerItem.displayValue = "";


  $scope.loanerItem.value = "";


};


View solution in original post

5 REPLIES 5

I actually don't know that answer. I thought it is important, but you can try it the other way and see if it still works.