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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

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

seanccc
17-Peridot

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
 
ACCEPTED SOLUTION

Accepted Solutions

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
abrigode
12-Amethyst
(To:seanccc)

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

Hi,

This behavior is working as per product specifications.

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

seanccc
17-Peridot
(To:smainente)

@smainente ,

 

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

 

Regards,

Sean

Announcements


Top Tags