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

FindDataTableEntries doesn't work if the data shape's boolean field set to true?

SOLVED
Pearl

FindDataTableEntries doesn't work if the data shape's boolean field set to true?

Hi ,

 

I have a data table with the data shape below,  just found a very strange behavior, for the service: 

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

var values = me.CreateValuesWithData({
values: { WorkOrderId: "NA", DeviceId: "OP10-OvenREHM00001" } /* JSON */
});

result = me.FindDataTableEntries({
values: values /* INFOTABLE */
});

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

The result always return empty as long as the field Estimated is true , otherwise it work well.   Is it a known issue ? 

 

Thingworx version: 8.4.4

Database: Posgresql 10.x

 

-----------Table Structure-----------------

 

Seq
INTEGER
KEY  
 
DeviceId
STRING
KEY  
 
DataProducedTime
DATETIME
KEY  
 
WorkOrderId
STRING
KEY  
 
StartTime
DATETIME
   
 
Estimated
BOOLEAN
 
1 ACCEPTED SOLUTION

Accepted Solutions

Re: FindDataTableEntries doesn't work if the data shape's boolean field set to true?

Hi,

This behavior is working as per product specifications.

You can find more information in : https://www.ptc.com/en/support/article?n=CS292316

View solution in original post

3 REPLIES 3
Highlighted

Re: FindDataTableEntries doesn't work if the data shape's boolean field set to true?

Hi seanccc,

 

FindDataTablesEntries() is listed as only searching on set indexes which might be why you are seeing some issues. Other alternatives include QueryDataTableEntries() or if you have the key for the record you are searching for GetDataTableEntryByKey() is better if you are looking for one record. 

 

Note: If using GetDataTableEntryByKey(), it is a best practice to wrap the call in a try/catch block as GetDataTableEntryByKey() will throw an error if it does not find the record.

 

-Andrew

Re: FindDataTableEntries doesn't work if the data shape's boolean field set to true?

Hi,

This behavior is working as per product specifications.

You can find more information in : https://www.ptc.com/en/support/article?n=CS292316

View solution in original post

Re: FindDataTableEntries doesn't work if the data shape's boolean field set to true?

@smainente ,

 

Thank for the information.  The find* service work again if  remove the default value setting.  

 

Regards,

Sean

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________