Community
Connect with us and enhance your M-Files experience using Extension Kit for M-Files. Here is how to get started.

Notifications
Clear all
0
31/10/2023 11:33 am
Topic starter
Hi,
We have some calculated properties in our vault and would like to migrate the code to the extension kit so we can do recalculations on a scheduled basis.
Have been trying to get this code fragment into 'Extended Auto Properties', but so far without success.
How should we configure and would it even be possible?
----
Option Explicit
Dim oPropertyValues : Set oPropertyValues = Vault.ObjectPropertyOperations.GetProperties( ObjVer, True)
Dim iDeleteYear : iDeleteYear = vault.PropertyDefOperations.GetPropertyDefIDByAlias("clbrm.delete-year")
Dim oDeleteYear : oDeleteYear = oPropertyValues.SearchForProperty(iDeleteYear).Value
Dim MyOutput : MyOutput = 0
Dim MyYear : MyYear = Year(now)
If Not IsNull(oDeleteYear) then
if Len(oDeleteYear) > 0 then
if oDeleteYear >= MyYear then
MyOutput = 1
End if
end if
end if
output = MyOutput
----
Any suggestions are welcome :-).
Thanks in advance and best regards, Tom
2 Answers
0
31/10/2023 12:52 pm
Topic starter
Hi Nikolina,
Silly me, works as a charm 👍 .
Thanks, Tom