changevalueobjectpropertiesscripts
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| changevalueobjectpropertiesscripts [2020/05/14 01:01] – created wikiadmin | changevalueobjectpropertiesscripts [2020/11/29 14:08] (current) – wikiadmin | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| * AlwaysSend (usually false, so the connector is in control of whether to pass the data or not) | * AlwaysSend (usually false, so the connector is in control of whether to pass the data or not) | ||
| - | Change the data quality of a value from good to bad | + | **Change the data quality of a value** |
| <code JavaScript> | <code JavaScript> | ||
| Line 21: | Line 20: | ||
| vo; | vo; | ||
| </ | </ | ||
| + | |||
| + | Some data sources will generate valueobjects with AlwaysSend set to true which overrides settings on connectors. Sometimes this needs to be changed. | ||
| + | |||
| + | **Change the AlwaysSend property of a ValueObject** | ||
| + | |||
| + | <code JavaScript> | ||
| + | //this changes the AlwaysSend of the incoming ValueObject to false | ||
| + | |||
| + | vo=incomingValue; | ||
| + | vo.setAlwaysSend(false); | ||
| + | vo; | ||
| + | </ | ||
| + | |||
| + | ** Convert the timestamp of the incoming value to a SQL Date/Time ** | ||
| + | <code JavaScript> | ||
| + | new Date(incomingValue.getDate()).toISOString().slice(0, | ||
| + | </ | ||
| + | The string can then be used to build a SQL statement | ||
changevalueobjectpropertiesscripts.1589432505.txt.gz · Last modified: by wikiadmin
