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

How to set an attribute with type PASSWORD ?

SOLVED
sebastienl
Newbie

How to set an attribute with type PASSWORD ?

Hi All,

I'm trying to set in a JS service the value of an attribute with basetype PASSWORD but I can't find how to do it. Any idea ?

Thanks a lot,

       Seb

To reproduce :

On a thing create an attribute 'password' with type PASSWORD

In a service add : me.password= '1234';

=> : 'Unable To Convert From java.lang.String to PASSWORD'


Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to set an attribute with type PASSWORD ?

Try using the following

var params = {

  data: undefined /* STRING */

};

// result: STRING

var result = Resources["EncryptionServices"].EncryptPropertyValue(params);

and then use the result to set the Property value.

View solution in original post

2 REPLIES 2

Re: How to set an attribute with type PASSWORD ?

Try using the following

var params = {

  data: undefined /* STRING */

};

// result: STRING

var result = Resources["EncryptionServices"].EncryptPropertyValue(params);

and then use the result to set the Property value.

View solution in original post

Re: How to set an attribute with type PASSWORD ?

It works perfectly ! Thanks a lot.

       Seb

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.