+ Reply to Thread
Results 1 to 10 of 10

Thread: Preserving empty or null fields

  1. #1
    BobCrifasi is offline Junior Member Monarch Forum Newcomer (Welcome!)
    Join Date
    Jul 2007
    Location
    UMDNJ, UBHC Piscataway, NJ
    Posts
    8

    Post

    Hi folks. I'm new to Monarch V9Pro and this forum. Please forgive me if this has been answered before. I'm trying to deal with dome data situations when the field defined is either empty or null. Monarch insists on filling the field with the data from the prior "record". This is in spite of the fact that the "leave Blank" radio button is "pushed". Any ideas?
    Bob C.

  2. #2
    Grant Perkins is offline Monarch Forum Life Fellow Perpetual Guru of Monarch
    Join Date
    Nov 2002
    Location
    Derby, United Kingdom
    Posts
    2,975

    Post

    Hi Bob and welcome to the forum.

    So far as I know that field property is not something with any complex states. It has been around for a long time so should be stable and I don't have a problem here when I run a quick test.

    So that suggests either that you have found an interesting anomaly or things in your model are not quite as you see them.

    Are you able to change the radio button from one setting to the other yet not see the effect or can you see the effect but it is just not persistent when the model is closed and re-opened?

    I suppose I should start with the basic question for completeness of analysis: Are you sure that the field(s) you are working with are indeed the ones you think you are working with and that they are empty?

    I don't mean that to sound like an insulting question - I think we all have times when things that appear obvious and are not considered to be worth checking turn out to be the source of a problem. I know I have such moments, usually when I have started with question 3 of the check list rather than question 1.

    Is this a traditional model or are you using Linked Objects?

    There are probably other questions I should be asking but right now they are not coming to mind. So let's start with those.

    Grant
    Grant Perkins
    MONARCH | | Ň | EXPERTS
    http://www.monarchexperts.com
    mailto:grant@monarchexperts.com

    V11.7 (Pro): Windows 7 Pro
    V9, V10.5 (Pro): Windows 7
    Earlier versions "archived" as machines died ...

  3. #3
    BobCrifasi is offline Junior Member Monarch Forum Newcomer (Welcome!)
    Join Date
    Jul 2007
    Location
    UMDNJ, UBHC Piscataway, NJ
    Posts
    8

    Post

    Grant,
    I have to agree with you this should be very simple, that's why I'm confused at the moment.

    No, I doubt very strongly that I have found an anomaly, just being inept at using my new toy.

    Yes, I have switched it and have seen no effect.

    The field is "trapped" with an append template and used in the "sort". It's one of several lines in the "heading" (it's a text input report so the header and pagination are not recognized as such). The entire line is absent in the input report, so there is actually no data to trap. I am assuming this leaves the field either null or empty. The table still shows the data from the last existing data trapped.

    No, this uses no linked objects.

    I am in no way insulted. Trouble shooting someone else's problem, remotely is awkward at best. Especially given that person is a "green horn" and is not sure what to tell you. Thanks for responding.
    Bob C.

  4. #4
    Grant Perkins is offline Monarch Forum Life Fellow Perpetual Guru of Monarch
    Join Date
    Nov 2002
    Location
    Derby, United Kingdom
    Posts
    2,975

    Post

    Bob,

    Is the data field being filled a field that would normally exist (with characters) in the template where the template is trapped on a different line?

    If the trap is on the line with the field but that line has nothing to trap it (for instance) then it will not actually exist as a an occurrence of the append template at all - the preceding template will prevail.

    Is the append template just an append or have you set it to be a page header? (Though on the basis of the above if it should be a page header but will not trap anything the same result will apply.

    The word "sort" also caught my eye but right now I can't think of a mechanism (unless you have some interesting data groupings which can be easily misleading - it has happened to me) by which this sort of problem would occur. Blank fields would, one would expect, be sorted to the top or bottom of the the resulting table.

    I'm currently inclined to think that the trap is simply being skipped for that line - what do the field identifications on the Report screen show you? (from one of the questionable lines " Edit > "Display Source of Record" should be the quickest route.)

    Two possibilities if the append is a normal append rather than a Page Header append (change the type to see if it makes any difference).

    One is as above - the trap does not work.

    The other is that the preceding detail record (assuming multiple lines) is shorter than the sample so the detail 'overlaps' the append trap and means it will not be picked up. If you see what I mean.

    (Note that it is possible to to use data from within a detail sample area to populate append fields. However the Append trap do that must be identical or almost identical to the detail trap for that to be successful, i.e. - the same but ends before the end of the detail trap is OK. Ends after the detail trap will not work. )

    HTH


    Grant
    Grant Perkins
    MONARCH | | Ň | EXPERTS
    http://www.monarchexperts.com
    mailto:grant@monarchexperts.com

    V11.7 (Pro): Windows 7 Pro
    V9, V10.5 (Pro): Windows 7
    Earlier versions "archived" as machines died ...

  5. #5
    BobCrifasi is offline Junior Member Monarch Forum Newcomer (Welcome!)
    Join Date
    Jul 2007
    Location
    UMDNJ, UBHC Piscataway, NJ
    Posts
    8

    Post

    Grant,
    Sorry about the extra empty posts. I'm still getting the hang of the format here. I think we are zeroing in on the problem here.

    It's not a multiple line situation. The trap info and the field are all on the same line. The entire line on occasion is blank. It is an append trap. It is actually part of the report header. I am using append as opposed to header traps, as per the manual, because Monarch does not appear to be picking up the control characters, since the input is straight text. The table is perfect and all the detail data is being picked up correctly with this one exception. When this line is absent there is no data to trap and there is no data to fill the field. Monarch seems to be filling it with the data existing from the last successful trap for this field.
    This would be understandable if I had the "empty cells" function set to "copy from previous record" but it is in fact set to "leave blank".

    Pardon my use of "sort" at that point it only confused
    Bob C.

  6. #6
    Grant Perkins is offline Monarch Forum Life Fellow Perpetual Guru of Monarch
    Join Date
    Nov 2002
    Location
    Derby, United Kingdom
    Posts
    2,975

    Post

    Originally posted by BobCrifasi:
    The trap info and the field are all on the same line. The entire line on occasion is blank.
    Bob,

    Are you trapping only on the occurrence of blanks in the line? If not a blank line will not present a trap at all. (So the template change would not be recognised and the previous template would still be in play.

    Only if the template change is identified but the resulting fields are empty will the option to fill the values from the previous value in the field come into play.

    An empty line therefore makes me suspect that the trap will not be applied.

    ---


    Just as background - a couple of other things that you may find useful.

    The Page header trap can be used to define your own 'pages', ignoring the print file pages, based on a regular recurring pattern in the report. This can sometimes be very useful. A Page Header template also has special properties that help when records are spread across page boundaries.

    Inadvertent postings to the forum. They happen (for me) all the time. You can always go into any post you have authored and edit it or delete it. The 'paper and pen' icon usually just to the left of the quotes icon will get you there.

    HTH.


    Grant
    Grant Perkins
    MONARCH | | Ň | EXPERTS
    http://www.monarchexperts.com
    mailto:grant@monarchexperts.com

    V11.7 (Pro): Windows 7 Pro
    V9, V10.5 (Pro): Windows 7
    Earlier versions "archived" as machines died ...

  7. #7
    BobCrifasi is offline Junior Member Monarch Forum Newcomer (Welcome!)
    Join Date
    Jul 2007
    Location
    UMDNJ, UBHC Piscataway, NJ
    Posts
    8

    Post

    Grant,
    We are on the "same page" now. That explains exactly what is happening. Since the line is blank there is nothing to trap, so the last successful trap (and the data from it) is in play. Therefore Monarch sees no blank field to apply the "Leave Blank" setting to. I just recieved a return message from Monarch support and that only applies to detail traps in any event. I still need to find a way around the situation. Thanks for helping me get this far. I'm still listening.
    Bob C.

  8. #8
    Grant Perkins is offline Monarch Forum Life Fellow Perpetual Guru of Monarch
    Join Date
    Nov 2002
    Location
    Derby, United Kingdom
    Posts
    2,975

    Post

    Hi Bob,

    Ok. So we need to find a new trap for you to use on that append. One that is not prone to blank traps!

    Could you post a sample of the report with those lines (and a few around it) where the trap is successful and where not successful.

    Cut and paste should work.

    Use the little CODE button below the text entry window to create the start and end markers and post the sample between them. That way the format of the text should be retained.

    If posting not possible then we need another way to see the format and seek an alternative trap.

    BTW - my V9 installation is quite happy to fill or unfill fields from an append template via the radio button control.


    HTH.


    Grant
    Grant Perkins
    MONARCH | | Ň | EXPERTS
    http://www.monarchexperts.com
    mailto:grant@monarchexperts.com

    V11.7 (Pro): Windows 7 Pro
    V9, V10.5 (Pro): Windows 7
    Earlier versions "archived" as machines died ...

  9. #9
    BobCrifasi is offline Junior Member Monarch Forum Newcomer (Welcome!)
    Join Date
    Jul 2007
    Location
    UMDNJ, UBHC Piscataway, NJ
    Posts
    8

    Post

    Grant,
    I can't find a way around this problem so far. I tried adding another trap, thinking that one that followed an unresolved trap would some how reset it. NG. I tried a multiple line trap with two fields. That would have worked because the preceding line is always there. The problem is that the trap characters and the field characters float irrelevant of each other, so that won't work either.
    The really funny part is I bought the software so I can have others here begin to do this sort of thing. Now we can't do what I need to do (so far). I could do this in VB, that's how I've been doing it in the past. I've converted several other processes successfully. But I'm stuck. I cant help but think there is a way to make this happen in Monarch. I just dont know what it is yet.
    Bob C.

  10. #10
    Grant Perkins is offline Monarch Forum Life Fellow Perpetual Guru of Monarch
    Join Date
    Nov 2002
    Location
    Derby, United Kingdom
    Posts
    2,975

    Post

    Bob,

    The report format that you sent to me does not look at all problematic but as I recall that was for a page that works OK.

    I can't do much with a bmp file of course but if you can send me a sample of the a couple of pages of the real file - be sure that the pages are samples that cover the problem areas you have found - and a copy of your model I will have a look at those and send back a model that I believe will work (unless there are other things we have not yet uncovered in the report!)

    There are a number of ways to approach this, some of which are more complex than others. I really don't think this should be too difficult but I always prefer to work 'hands-on' with representative data samples as it is much quicker and the problem areas become visible more readily.

    We may need a small tweak to part of a template somewhere - the question is: which tweak of many available?


    Grant
    Grant Perkins
    MONARCH | | Ň | EXPERTS
    http://www.monarchexperts.com
    mailto:grant@monarchexperts.com

    V11.7 (Pro): Windows 7 Pro
    V9, V10.5 (Pro): Windows 7
    Earlier versions "archived" as machines died ...

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts