Hello,
I am trying to write a Groovy Script in Behaviours Plugin.
I have two Database Custom Fields, "Header Priority Value" and "SubHeader Priority Value".
I get the values 3.000000 and 2.000000 for these fields (Using SQL Query).
I have to add the values in those two fields and get the sum, and use that sum to set Priority.
This is the script i put on "SubHeader Priority Value" field:
FormField GV = getFieldById ("priority")
FormField HP = getFieldByName ("Header Priority Value")
FormField SHP = getFieldByName ("SubHeader Priority Value")
String HPV = HP.getValue()
String SHPV = SHP.getValue()
String PVSUM = HPV + SHPV
log.error PVSUM
When i run this i am getting 3.0000002.000000 instead of 5.000000
I think this is because the values are considered as Strings. How do i do it ?