I'm trying to create a label expression to label different arsenic concentrations found in soil samples.
I am extremely new to VBS and looking for a little direction on the coding.
Data Fields I am working with
SampleID = the soil sample ID
Field2 = Sample Depth to 6"
Field3 = Sample Depth to 12"
Field4 = Sample Depth to 24"
This is what I have so far as a start. when i run it it returns 0 as a label and not the actually values in the data tables.
Function FindLabel ([sampleID], [Field2], [Field3], [Field4])
if ( [Field2] >=9.70 ) then
Field2 = "0-0.5: " & "<clr blue= '200'>" & [Field2] & "</clr>"
end if
if ( [Field2] <=9.70 ) then
Field2 = "0-0.5: " & "<clr green= '200'>" & [Field2] & "</clr>"
end if
End Function
Goal of the expression is to end up with label like:
J6
0-0.5 = 5.00
0.5-12 = 6.00
12-24 = 9.70
With any of the data samples over 9.70 to be a different color to highlight a higher concentration is arsenic.
Thanks for any help or trick to help a long the way
Shaun
I am extremely new to VBS and looking for a little direction on the coding.
Data Fields I am working with
SampleID = the soil sample ID
Field2 = Sample Depth to 6"
Field3 = Sample Depth to 12"
Field4 = Sample Depth to 24"
This is what I have so far as a start. when i run it it returns 0 as a label and not the actually values in the data tables.
Function FindLabel ([sampleID], [Field2], [Field3], [Field4])
if ( [Field2] >=9.70 ) then
Field2 = "0-0.5: " & "<clr blue= '200'>" & [Field2] & "</clr>"
end if
if ( [Field2] <=9.70 ) then
Field2 = "0-0.5: " & "<clr green= '200'>" & [Field2] & "</clr>"
end if
End Function
Goal of the expression is to end up with label like:
J6
0-0.5 = 5.00
0.5-12 = 6.00
12-24 = 9.70
With any of the data samples over 9.70 to be a different color to highlight a higher concentration is arsenic.
Thanks for any help or trick to help a long the way
Shaun