You can define formulas or functions according to the VB .NET rules. For more information, see http://msdn.microsoft.com/vbasic.
Use the Formula control to add, subtract, multiply or divide values.
Some sample formulas:
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
The temp variable c is used in order to avoid calling the function twice:
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}
Append a prefix and a suffix
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