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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

How to set an attribute with type PASSWORD ?

sebastienl
1-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'


1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:sebastienl)

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
PaiChung
22-Sapphire I
(To:sebastienl)

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.

It works perfectly ! Thanks a lot.

       Seb

Top Tags