I'm trying to write a utility to add string values into a string PiPoint. I have that part working but I'm not sure how to prevent the user from adding duplicate values.
I've been looing into the AFUpdateOption Enum but since the time is sent into UpdateValue from the timedate control with no seconds and milliseconds but the values in PI have seconds and milliseconds, there is never the "same time".
|0||Add the value to the archive. If any values exist at the same time, will |
overwrite one of them and set its Substituted flag.
|1||Add the value to the archive. Any existing values at the same time are not |
|2||Add the value to the archive only if no value exists at the same time. If a |
value already exists for that time, the passed value is ignored.
|3||Replace an existing value in the archive at the specified time. If no |
existing value is found, the passed value is ignored.
|5||Add the value to the archive without compression. If this value is written |
to the snapshot, the previous snapshot value will be written to the archive,
without regard to compression settings. Note that if a subsequent snapshot value
is written without the InsertNoCompression option, the value added with
the InsertNoCompression option is still subject to compression.
|6||Remove the value from the archive if a value exists at the passed time.|