I am trying to replace some very confusing coding to calculate the percent gravel and sand on our grain size results. I have six grain size results reporting on one GRAPH form. I would like to use the gINT help example for calculating gravel as follows but am not sure how to incorporate the datasetkey<<#>> in this code so that the six different results print.
From Gint Help:
Soil Fractions
1) Gravel:
If the maximum particle size is:
Less than or equal to 4.75mm, Gravel % = 0
less than or equal to 75, Gravel % = Maximum % passing (should be 100) - % passing 4.75mm
Else, Gravel % = % passing 75mm - % passing 4.75mm
<<Case(_ <<Max(<<SV READINGS.Reading>>)>>,_ <= 4.75,0,_ <= 75,_ <<Calc(_ <<Max(<<SV READINGS.Percent_Finer>>)>> - _ <<Interpolate(_ <<SV READINGS.Percent_Finer>>,_ <<SV READINGS.Reading>> = 4.75,A,L_ )>>_ )>>,_ Else,_ <<Calc(_ <<Interpolate(_ <<SV READINGS.Percent_Finer>>,_ <<SV READINGS.Reading>> = 75,A,L_ )>> - _ <<Interpolate(_ <<SV READINGS.Percent_Finer>>,_ <<SV READINGS.Reading>> = 4.75,A,L_ )>>_ )>>_ )>>
Hi Monique,
This is the standard expression delivered with the grains size report in the gINT standard US lab file set for Gravel .
The file set is available here
The gINT standard US Lab file set has a few User System Data items embedded in the expression
This is the expression
<<Let(Size Max = 75)>>_<<Let(Size Min = 4.75)>>_<<Format(<<User System Data.PC_Fraction_Multi>>,0.0)>>
This is the expression with all of the USD's exploded
<<Let(Size Max = 75)>>_<<Let(Size Min = 4.75)>>_<<Format(<<Let(PC Min = _ <<Let(Size = <<Get(Size Min)>>)>>_ <<Interpolate(<<Union(<<SV READINGS.Percent_Finer>>,_ <<HYD READINGS.Percent_Finer>>_ )>><<#>>,_ <<Union(<<SV READINGS.Reading>>,_ <<HYD READINGS.Particle_Size>>_ )>> = <<Get(Size)>>,A,L_)>>_)>>_<<Let(PC Max = _ <<Let(Size = <<Get(Size Max)>>)>>_ <<Interpolate(<<Union(<<SV READINGS.Percent_Finer>>,_ <<HYD READINGS.Percent_Finer>>_ )>><<#>>,_ <<Union(<<SV READINGS.Reading>>,_ <<HYD READINGS.Particle_Size>>_ )>> = <<Get(Size)>>,A,L_)>>_)>>_<<Let(Max Sieve = <<Max(<<SV READINGS.Reading>><<#>>)>>)>>_<<Let(Max Finer = <<Max(<<SV READINGS.Percent_Finer>><<#>>)>>)>>_<<IIf((<<Get(Size Min)>> < <<Get(Max Sieve)>>) Or _ (<<Get(Max Finer)>> = 100),_ <<Case(<<Get(Max Sieve)>>,_ <= <<Get(Size Min)>>,0,_ <= <<Get(Size Max)>>,<<Calc(<<Get(Max Finer)>> - <<Get(PC Min)>>)>>,_ Else,<<Calc(<<Get(PC Max)>> - <<Get(PC Min)>>)>>_ )>>_)>>,0.0)>>
Make sure your text entity has the Repeat tab set with the appropriate numbers
Example
I would recommend copying the items from the gINT std US lab file set into your library so you can use the first expression which is easy to read