È possibile definire formule o funzioni in base alle regole VB .NET. Per ulteriori informazioni, vedere http://msdn.microsoft.com/vbasic.
Utilizzare il controllo Formula per aggiungere, sottrarre, moltiplicare o dividere valori.
Di seguito vengono forniti alcuni esempi di formule:
result="The FID is " & {FID}& "."
result = Me.ConnectionTools.LngValue("select count(*) from <table> where column=" & LngValue("parent_fid"))
if Me.GeometryAvailable then result="Geometry available" Me.ForeColor="" Me.BackColor="" else result="No Geometry available" Me.ForeColor="white" 'These are HTML colors ! Me.BackColor="red" end if
Per evitare di chiamare la funzione due volte, viene utilizzata la variabile temporanea c:
dim c as integer c = me.DocumentCount if c=0 then result="No Documents available" Me.BackColor="" else result=c & " Document(s) available" Me.BackColor="red" end if
Result = {HEIGHT} + 20
Result = {HEIGHT} * 20
Result = {HEIGHT} / 20
Result = {HEIGHT} – 20
Result = {HEIGHT_1} + {HEIGHT_2} *10
Result = {attribute name1} * {attribute name3} *10
result = {TEXT1} & {TEXT2}
Aggiunta di un prefisso e un suffisso
result = "Approx. " & {AREA} & "m2"
result = "MH " & {FID}
Dim d As Date
Dim t As System.TimeSpan
d = Me.Value("maintenance_next_date")
t = d.Subtract(now)
result=t.Days