3 Replies Latest reply: May 15, 2014 9:54 AM by Tom Whiteside RSS

    Conditional trap?

    Gordon _

      I am trying to create a model which will trap one field (Collateral code) that appears only in some records. If the term "Collateral code" doesn't appear, then there isn't any collateral, which is valuable info. Is there a way to capture based upon a particular phrase NOT appearing within a record? Here is some more possibly relevant info: the record detail is spread out over a variable number of lines. So while a given field will always appear in the same place on the line, it may occur on line 6 on one record and line 8 on another, since some lines are printed only if they are relevant to that record.

       

      I know how to solve my problem in VB, which I was using before Monarch, but I really like the simplicity and elegance of Monarch. Help!

        • Conditional trap?
          Tom Whiteside

          Gordon, is this at all helpful?  This works as conditional display after trapping all, instead of conditional trapping:

           

          =IsEmpty()

           

          If "Collateral code" is both your field name AND a phrase (sometimes) contained within the field:

           

          Instr("Collateral code", )=0

           

          I have a strong feeling I'm missing something?    :confused: 

           

          Tom

          • Conditional trap?
            Gordon _

            I like your approach, but I haven't figured out yet how to trap all records due to the changing number of lines. If I try to create a detail template based upon the first record (which is 14 lines), the highlight for the second record (after clicking 'Preview Template') extends past the second record into the third, since Record 2 is only 10 lines. Each record is separated by a blank line so, visually, it is easy to see the separate records, but I haven't yet found how to do that in Monarch. I'm sure it's simple and I'm just missing something obvious.

            • Conditional trap?
              Tom Whiteside

              Your approach will depend on whether your 14 line record is 14 wrapped-lines of detail for a single field, or, 14 lines of many different fields.  Also, under Field Properties - Advanced, have you tried either End Field On Blank Field Value, or, End Field When Template Is Encountered?

               

              I'm sending you a private message with a request for a sample of your layout.  Hope something from above will work in the meantime.

               

              Tom