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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

AddRow function does not update primary key field of infotable on ThingWorx

AO_10206447
3-Visitor

AddRow function does not update primary key field of infotable on ThingWorx

I am using the AddRow function to update an infotable.

It is copying values into all other fields except the primary key field.

Kindly advise me on how to correct this. See code snippet below and attached screenshot of the infotable.

 

// Get a direct reference to the infoTableProperty on the entity
var Pump_Curves = me.Pump_Curves;
// Create a new NamedVTQ entry object to add to the infotable
var newEntry = new Object();
newEntry.Delta_P = 1.87; // primary key
newEntry.RPM_700 = 14;
newEntry.RPM_800 = 15;
newEntry.RPM_900 = 1.2;
newEntry.RPM_1000 = 2.1;
newEntry.RPM_1140 = 5;
newEntry.RPM_ACT = me.F1; // Current flowrate
Pump_Curves.AddRow(newEntry);

2 REPLIES 2
PaiChung
22-Sapphire I
(To:AO_10206447)

This all looks correct, it shouldn't at all care about 'primary key' for an InfoTable.

The only thought I have is, try it with Delta_P set to 2.0 vs 1.87 and see what happens? or 2?

Thanks PaiChung.

I have tried 2 and 2.0 to see what happens.

The service still behaves the same way. The issue is not yet resolved.

Top Tags