3 Replies Latest reply: May 15, 2014 10:07 AM by Data Kruncher RSS

    Which Template goes where, again?

    Rebekah T

      I've never posted to the forum, but I am tired of spinning my wheels, and maybe someone knows this, as it is pretty basic - I am sure.

       

      If my detail template puts rows in the table, then I really want my User to be my detail trap - I am good with that. Each represented entity has a user field. But the data that I want to trap includes User's Real Name (and some don't have this field) and then the Last Logon (this may not exist for some, either). If I make my User the detail, and the others as footer templates, then the ones below the nonexistent field fill in the the null footers.

      This is a report bit:

       

      [FONT="Courier New"]User: 001 (#104)

      User's Real Name: AJ

      User's Email: AJ

          Disable Change Password

          User Group Administrator

          Locked

          Digital Signature

      User Groups:

          General Reports

       

      User: 004 (#574)

      User's Real Name: HM

      User's Email: HM

          Disable Change Password

          User Group Administrator

          Locked

          Digital Signature

          [U]Last Logon: 05/24/2010 07:59:30 AM[/U][/B]

          User Groups:

          Domain Users

          General Reports[/FONT]

       

      The first entity on the list doesn't have a last logon, and so the data from this last logon template populates that one in the table window. I hoped that the "Empty cells - leave blank" check box would save me, but it is already checked. What logic am I missing here?

       

      Thanks !!:confused:

        • Which Template goes where, again?
          Data Kruncher

          Hi Rebekah, and welcome to the Monarch forum!

           

          I can see how this could be frustrating. It's always a bit of a challenge when sometimes data exists for one record, but doesn't for another. Fortunately there's a technique that can be employed to solve the challenge that we often refer to as "the guru trap".

           

          It's a bit of a trick, but the process has been described a few times here in the forum, and [URL="http://********************/extract/experimentation-produces-monarch-success"]elsewhere[/URL].

           

          First off though, here's how I quickly built a model for your sample.

           

          Using a four line sample for every line with brackets, I made a detail template using only the first [ character as a trap. I painted the space between as the field value (I assume that an X appears there when applicable).

           

          Next, I created an append template with a three line sample to pickup the user number, real name, and email.

           

          Now, the more interesting parts. For the Last Logon, I created another append, using exactly the same trap character for this template as I did for the detail template: the [ character.

           

          I know, that makes no sense at all as the [ doesn't appear in that line. That's OK. Now I painted the date and time as a field, and went to the Advanced tab of the field properties, and for the Preceding string in current line option, I entered: last logon then saved field and the template.

           

          I repeated that process somewhat to create the final template, another append template (with a one line sample), once again using [ in the first position for the trap, and painting the Domain Users text as the field. This time around, on the Advanced tab of the field properties, I set the String user groups: anywhere in the previous line. I also set the field to End on end of left justification.

           

          This process captured all of the data and created two records in the table, one for each user.

           

          HTH,

          Kruncher