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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Is it possible to modify the VTQ configurations and add a new sub-property?

Rishabh345
6-Contributor

Is it possible to modify the VTQ configurations and add a new sub-property?

Is it possible to change the VTQ config and add a new field definition there, for example: for a certain property I want to ingest Value, Timestamp, Quality, and Unit (of measure)?

Rishabh345_0-1678087917885.png

For example we are currently setting only the Lat, Long, Altitude and date time, and I want to add 2 new field to store GPS accuracy and GSM strength in the same value stream.

Is it doable? Any lead is greatly appreciated.  

  

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

 

The VTQ structure is fixed, i.e. you can't add unit of measure to value, timestamp and quality. You'd need to create Properties for those extra parameters, i.e. "gpsPosition" of type LOCATION, "gpsAccuracy" and "gsmStrength", both of type NUMBER.

 

You can set all three of them at the same time, like this:

 

var props = Resources["InfoTableFunctions"].CreateInfoTable();
props.AddField({ name: 'gpsLocation', baseType: 'LOCATION' });
props.AddField({ name: 'gpsAccuracy', baseType: 'NUMBER' });
props.AddField({ name: 'gsmStrength', baseType: 'NUMBER' });
props.AddRow({
    gpsLocation: { latitude: 1, longitude: 1, elevation: 0, units: 'WGS84' },
    gpsAccuracy: 10.0,
    gsmStrength: 0.5
});
me.SetPropertyValues({ values: props });

 

In this case all three will get recorded in the ValueStream simultaneously, in the same DB row.

 

/ Constantine

View solution in original post

1 REPLY 1

Hello,

 

The VTQ structure is fixed, i.e. you can't add unit of measure to value, timestamp and quality. You'd need to create Properties for those extra parameters, i.e. "gpsPosition" of type LOCATION, "gpsAccuracy" and "gsmStrength", both of type NUMBER.

 

You can set all three of them at the same time, like this:

 

var props = Resources["InfoTableFunctions"].CreateInfoTable();
props.AddField({ name: 'gpsLocation', baseType: 'LOCATION' });
props.AddField({ name: 'gpsAccuracy', baseType: 'NUMBER' });
props.AddField({ name: 'gsmStrength', baseType: 'NUMBER' });
props.AddRow({
    gpsLocation: { latitude: 1, longitude: 1, elevation: 0, units: 'WGS84' },
    gpsAccuracy: 10.0,
    gsmStrength: 0.5
});
me.SetPropertyValues({ values: props });

 

In this case all three will get recorded in the ValueStream simultaneously, in the same DB row.

 

/ Constantine

Top Tags