Dependant columns in log template

Hi,

I have an issue I'm sure many would have come across:

On a multiple plot (log template), I have several columns of data. I apply an output condition on each data record (like the soil unit check on depth). The condition is then checked for each column and it takes ages to produce the output. Would there exist a trick to allow doing the check only once (per table of course)?

If not, that would be great in a future version of gINT (like having dependant columns like for tables...)!

I hope it makes sense!

Thank you

Jerome

  • It might be helpful if you shared what specifically you are trying to do.  From the above I gather you want to have an output condition that considers depth.  This can be easily handled using aggregate functions in the entire entity output condition field of the entity (item 1 in my original post).  For example, the expression:

    <<Calc(<<Min(<<SAMPLE.Depth>>,<<SAMPLE.Recovery_Length>> > 4)>> < 15)>>

    Will suppress output of the entity for any point where the depth to the first recovery length that exceeds 4 is more than 15. 

    For example, if the sample table for point 1 has

    Depth, Recovery_length

    0, 1.5

    4, 2.0

    10, 0.5

    12, 1.5

    16, 5.0

    18, 3.0

    and for point 2 you have:

    Depth, Recovery_length

    0, 1.0

    4, 2.0

    10, 4.5

    15, 3.0

    The entity will not print for point 1 but will print for point 2 (ie the first depth (minimum) where recovery exceeds 4 is 16 for point 1 which is not less than 15 so false is returned.  The first depth where recovery exceeds 4 for point 2 is 10 which is less than 15 so true is returned).  You can get as complicated as you want to using aggregate functions or sql functions and it is only evaluated once per point.

    If this is not what you are looking for, please provide specific details on what you are trying to accomplish.

  • Hi Szang,
    thanks for your help. Your item 1 is definitely not what I'm looking for as I want to keep some records of each entity after filtering.
    Let me describe more precisely what I want:

    Let's say I have a log with 10 column-plots.
    Each of those show a different parameter from the same table of say 2000 records.
    I want to keep only records that satisfy a condition evaluated by sql aggregate from another table.

    At the moment, the output condition check is done 10*2000*nb entities. I'd like to remove the 10 factor...
    Does it make sense?

    Thanks again for spending time on my quest!

    Jerome

  • I think I understand what you are trying to do but to make sure I will present a specific example below. My example only involves 4 columns, limited data, and a fairly simple output criteria.  Yours will obviously be a bit more complex.

    I have a table called LAB_TEST.  It has fields of Depth, LL ,PL , MC, and LAB_USCS. Data consists of results at 1 foot intervals from 1 to 9 feet as shown below.

    I also have a table called LITHOLOGY.  It has fields of Depth, Bottom, Description, and STRATA_ID

    You want to print the lab test results in 4 adjacent columns using text vs depth entities but you only want to print results at depths where the strata_id is "COE-CL".  In this case that will result in test values between the depths of 1.3 and 6 actually being printed.  To do this you will need to write a body text output criteria in the entities using an sqlrange function.  This will be checked once for each test result but it is the same check each time.  In this case it will be checked 4 x 9 = 36 times for this 1 boring. It is your desire to eliminate the 4 in the the above equation and only perform the check 9 times for each boring.

    If this does not represent what you are trying to do, you can ignore the rest of this post and respond with a SPECIFIC example.

    The solution is to combine the multiple column entities into a single entity that prints all the required results in columns.  This is done be setting up the column entity for the entire width of all results columns and then creating subcolumns within the entity for each individual result. An example of this is shown in the report design below.

    The results for each column are generated using the Tab function as shown in the depth vs text entity main tab below:

    Note that the text expression prints the results for all 4 columns in the proper position using the Tab function.  I have done simple left alignment tabs but you can change the alignment as you see fit. You can also include checks on what to do if no data is found or add formatting to the results

    The condition for output is in the configuration tab of the entity as shown below.

    Note the Body Data Output Condition uses the SqlRange function to return the strata_ID from the lithology table associated with the current lab test depth and checks it against the literal "COE-CL"

    The output result is shown below.

    Note that only results for depths between 2 and 6 feet are printed even though data was available for depths between 1 and 9 feet.  Since there is only one entity, the Sql function was only evaluated once for each line of data or a total of 9 times.

    Obviously the above example will have to be adapted to your data structure and your situation but it hopefully gives you an idea of how to proceed.

  • Hi Szang,

    thank you very much for this example. That's very interesting, I wasn't aware of the possibility to have subcolumns!

    My issue is exactly like you describe, except that I want that for plots rather than text, so that makes it a lot more tricky!

    Thanks again for taking the time for the reply

    Jerome

  • Please post a SPECIFIC example as requested. A specific example includes:

    A sample of the data you are trying to represent. This includes relevant table and field names

    A sample of the data that will be controlling whether the entity outputs or not. This includes relevant table and field names. 

    A picture of the desired output. If not available, a red lined example showing why it is not working or a scetch showing how it should look. 

    A screen capture of the entity  that you have a problem with showing the current properties and settings. This includes both the main tab and the configuration tab as a minimum and any other relevant tabs. Make sure to expand any fields that have long expressions or copy and paste the long expressions into a code object in the post.

    Any other relevant data or settings

    This saves me and others from having to continually guess at what you are trying to accomplish.

    To be clear,  I see at least 3 potential solutions to this issue. There are likely more. Before I develope and test another solution, I need to know what exact constraints are imposed by the data and desired output. Replicating the current problem also gives me a baseline to test the solutions against.