End of Boring Depth Expression

Hello,

I'm attempting to write a depth expression that will place an end of drive at X feet about half a foot below the end of the log. The expression <<(<<POINT.HoleDepth>>+0.5)>> works for most of the logs except a few where in the field the recovery was greater than the drive. In these situations, as shown in the attached image, the end of drive expression end up within the log. The hole depth field is the same at the drive/advance. I have attempted to write an If expression that will use the recovery depth instead in situations where the recovery is greater than the advance but have been unable to get my expression to work: <<IIf((<<LITHOLOGIC SAMPLE.Recovery>> > <<LITHOLOGIC SAMPLE.Advance>>),<<LITHOLOGIC SAMPLE.Recovery>>+0.5,<<POINT.HoleDepth>>+0.5)>>. 

  • Hi Morgan,

    gINT has a built in property for Text vs Depth entities which may help you as it has helped me. On my lithology Text vs Depth entity, there's a tab for Second Text Spec which allows for a text expression and depth expression as well as a vertical offset. 

    My Text expression: <<Point.Termination>> at <<Max(<<Lithology.Bottom>>)>> feet Below  Current Ground Surface in <<Point.Term_Origin>>

    My depth depression: <<Max(<<Lithology.Bottom>>)>>

    My vertical offset:  -0.05 to provide some space from the line.

    This is nice though because it's part of the lithology text, it will push the text to the next page instead of below the report page window.

  • I do not know the details of your data structure but I will make the following assumptions:

    1. You truly do want an expression that returns the maximum depth recovered even if the recovered length is greater than the sampled length.  This would normally indicate an error in input or logging as it is not possible to recover more than you sampled or recover material from below the bottom of the hole. The normal procedure would be to correct the error but perhaps I am missing something.

    2. Your table LITHOLOGY SAMPLE has a key set of Point_ID, Depth.  That is, it contains depth related data for a specific boring. You can enter multiple depths each with its own associated sample advance and recovery length.

    3. The depth  field in the LITHOLOGY SAMPLE table contains the top depth of the sample in feet

    4. The <<LITHOLOGY SAMPLE.Recovery>> field contains the recovery in feet.  If the recovery is in inches you will have to change the expression to convert it to feet.

    5. Your LITHOLOGY SAMPLE table does not contain a bottom depth field

    If any of these assumptions is not correct the solution presented below may not work.

    To summarize what I believe you are looking for, If the amount entered for recovery for the deepest sample is more than the amount actually advanced then use that value; otherwise use the entered hole depth. To get the depth at the bottom of the recovered interval you will need to add the recovered length to the depth of the top of the sample.  Since there could be multiple samples and multiple depths, we need to extract the depth+recovery combination that creates the maximum (deepest) depth. Because we have to do some math to get the  number we want the maximum  of, we can not use gINT's <<Max()>> function which will only operate on a single field in a table. Thus we have to get more complicated and Use the <<Sql()>> function to extract the maximum bottom recovered depth. Once we have that we can compare it to the hole depth and select the maximum one using gINT's <<MaxValue()>> function.

    Example code to do this is presented below:

    <<MaxVal(_
      <<POINT.HoleDepth>>,_
      <<Sql(Select max([LITHOLOGY SAMPLE].[Depth] + [LITHOLOGY SAMPLE].[Recovery]) _
        FROM [LITHOLOGY SAMPLE] _
        WHERE [LITHOLOGY SAMPLE].[PointID] = <<CurrSetKey>>_
      )>>_
    )>>

    Note that the sql function requires arguments and fields written sql format not gINT format.

    Note that since I do not have your data structure I have not tested the above but I have tested a similar construction using another data structure and it seems to work.  I do not guarantee that I have reproduced all necessary commas delimiters parenthesis and spaces in the code window.

    Hope this helps.