This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Vb Script to compare and set boolean property

I would like you to assist me do comparison between two properties that are both real numbers in data type. Once the comparison is done I would like to then set a Boolean property that I have already defined as either yes or no depending on the results from the comparison.
The two properties are "sums assured" property id:1097 and "fcl limit" property id: 1098.
After an if condition the a Boolean property named: "sums assured> fcl" property id: 1150, should be set to either yes or no.
Please help.

This is my code so far that doesn't seem to work:

option explicit

Dim sums_assured
Dim myint1
Dim myint2
'Get Sum Assured Value
sums_assured = PropertyValues.SearchForProperty( 1097 ).TypedValue.GetValueAsUnlocalizedText
'Convert to integer
myint1=CInt(sums_assured)
' Get F.C.L. Limit

Dim fcl_limit

fcl_limit = PropertyValues.SearchForProperty( 1098 ).TypedValue.GetValueAsUnlocalizedText
'Convert to intger
myint2=CInt(fcl_limit)

If (myint1 > myint2 ) Then

Output.SetValue MFDatatypeBoolean,0

else

Output.SetValue MFDatatypeBoolean,-1
End If
Parents Reply Children
No Data