Correspondence Files: How to suppress display of Records having no data in a field

I am working with source file that has a Lab Results table that has Fields for minus#4, minus#40  % passing data, AND also has other data fields  eg Mositure, etc.

I an trying to suppress the display of records for the minus#4, minusXYZ, et al, that have no value for that test. For example where there is no test result data element for that minus#4, etc  My correspondence is however, bringing in all the depths in the table, even thought there is no minusXYZ data. Yes, there is Moisture data etc, and that is why the source has all these "spurious" depths, and, of course, they are coming in because they indeed are in the source table.

Can I suppress these "blank" rows through correspondence file code.

If not, I can rewrite the external code to push the minus#4, minusXYX, et al,  to a separate source table having only that data, but I would like to put the "how to do it in giNT" in my toolbelt too.

Ideas??

 

Parents
  • Doing this by memory so may have syntax wrong. In general, if the key field is not populated, the record will not be imported. Thus for your correspondence file the key field of PointID should be

    PointID,<<HasData(<<TEST_RESULTS.M200>>,<<TEST_RESUlTS.PoibtID>>)>>

    This will return the pointID if there is data in the m200 field and nothing if there us no data in the m200 field. If the pointID us not populated, the record will not be created and no other data will be imported (depth] even if it exists. The rest of your lines can be simple 1 to 1 correspondences. 

  • I am getting back on results of my test cases. I attach the results - No Joy, but fun to see what happens.

  • Picture 1 missin table header, bad/ncompkeat field name SIEVE, duplicate target fields, referencing source for p200 to #4. Again use the tool

    Picture 2. In addition to errors if picture 1, you added has data to both pointID and depth, not necessary for depth and it us set to return PointID for the depth field. PointID us text, depth is numeric. That is why you got all the type missmatch errors. 

  • See my notes of shame and embarrassment in image below:

    EDIT -  after posting this and looking at more of your post  -- More shame. Thanks for pointing me in the right direction. 

  • RE: Picture 1 missin table header, bad/ncompkeat field name SIEVE, duplicate target fields, referencing source for p200 to #4. Again use the tool

    RE missing table header, -- i did not copy and paste that section from the tool-created big correspondence file

    RE  bad/ncompkeat field name SIEVE  -  I think that Sieve you refer to ( in the first line of the correspondence snip) is not a Field Name but a Default Target 

    RE duplicate target fields - One of the Passing #4 is the Target Table, the other Passing #4 is a Field Name in that target Table. Yup - that can be confusing - I think I should name them not be NOT the same. 

    RE referencing source for p200 to #4. Again use the tool -  SMH on this one for sure. Much shame. Doh! Did use the tool, but got to hasty with my finger clicks.Joy




  • So for this the relevant portion of the correspondence file should probably be similar to:

    PASSING #4,TEST_RESULTS

    PointID,"<<HasData(<<TEST_RESULTS.Passing4>>,<<TEST_RESULTS.PointID>>)>>"

    Depth,<<TEST_RESULTS.Depth>>

    Passing #4,<<TEST_RESULTS.Passing4>>

    I assumed in the above that your source field name for passing number 4 was Passing4.  You will have to replace it with your actual source file name.  Also, the correspondence file tool will probably put quotes around the source expression for PointID but I don't think they are necessary in this case (can't hurt though)

    Sorry, I did not realize that you had PASSING #4 both as a table name and a field name and that the first line was actually the missing table header.

Reply
  • So for this the relevant portion of the correspondence file should probably be similar to:

    PASSING #4,TEST_RESULTS

    PointID,"<<HasData(<<TEST_RESULTS.Passing4>>,<<TEST_RESULTS.PointID>>)>>"

    Depth,<<TEST_RESULTS.Depth>>

    Passing #4,<<TEST_RESULTS.Passing4>>

    I assumed in the above that your source field name for passing number 4 was Passing4.  You will have to replace it with your actual source file name.  Also, the correspondence file tool will probably put quotes around the source expression for PointID but I don't think they are necessary in this case (can't hurt though)

    Sorry, I did not realize that you had PASSING #4 both as a table name and a field name and that the first line was actually the missing table header.

Children
No Data