Skip to main content
16-Pearl
August 23, 2024
Question

Issue of type password field in datashape making problem On import

  • August 23, 2024
  • 1 reply
  • 2087 views

Hello Community,

     I  have datatable with usercredentials stored in it and one of the field is of password type which i do hash also before saving it. Now the issue is when i import this datatable from thingworx 9.1 to 9.3 and in my code below:= i am unable to get the value from datatable it just does not appear EntryExists.row[0].loginPassword is undefined even though on old thingworx version everything is working fine.

 

 

 let EntryExists = Things[userDataTable].GetDataTableEntryByKey({ key: hashedLoginName });
 if(EntryExists && EntryExists.rows[0].hashedLoginName == hashedLoginName && EntryExists.rows[0].loginPassword == hashedLoginPassword){

 

 

I have changed nothing but still it just does not work because its not getting it from datatable but on other hand all the fields are showing values. Why its like that 

 

 

Jamal8548_0-1724404186317.png

 

My assumption: I think its not possible to import the userpassword which are hashed into another datatable and if i change the password field to string and then import the datatable still it shows the different hashed values and my service does not work on new server.....

1 reply

13-Aquamarine
August 23, 2024

Have you tried Universal Export, with Binary or XML, for entities not data?

MA873117416-PearlAuthor
16-Pearl
August 23, 2024

how can i export a datatable with binary or XML any idea? Its a datatable actually and i can only import it as data.

13-Aquamarine
August 23, 2024

I mean while exporting data table entity select universal export, and Export data as usual.

Also make sure whatever hashing key (mechanism I am guessing) you are using that is already present on target server.

javed_a_0-1724410204514.png