PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01/10/2013 9:09 AM by  Matthew Nye
user id added to SN makes it not work as requested
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages
SueS
Private
Private
Basic Member
(43 points)
Basic Member
Posts:19


Send Message:

--
01/09/2013 6:40 AM
    We have smart notes for showing before and after changes to dependent records. The fields on the smart note are employee #, relationship, dependent name, ss#, birthdate, and disability flag.

    Now a request was made to add the user id so they could see who changed the record. I can't get the smart notes to work correctly with the addition of the user id field which is defined as an attribute.

    It is showing up in the before part of the report because the user id has changed - it does not matter if the change was not to one of the key fields listed above. It could just be a change to the phone number and the dependent will then show up on the before part of the report.

    Example:

    New keys in Data from dependent changes

    emp relationship dependent ss# birthdate disabled userid
    12345 son Joe Smith ***-**-6789 01/01/92 N x1233

    Items no longer in Data from dependent changes

    emp relationship dependent ss# birthdate disabled userid
    76543 spouse Mary Jones ***-**-5667 11/22/55 N x1111
    12345 son Joe Smith ***-**-1111 01/01/92 N c1234

    The record for employee 12345 is correct being on the report because the ss# was changed. The record for employee 78543 should not be on the report because the only thing changed for the record was the phone #. It is showing up though because the old userid and new userid are different.

    Is there a way to have the user id on the report and only have it appear on the report if one of the fields that changed was relationship, dependent name, ss#, birthdate, and disability flag?



    Thanks.
    Will
    Private
    Private
    Veteran Member
    (117 points)
    Veteran Member
    Posts:39


    Send Message:

    --
    01/10/2013 5:44 AM
    Hi Sue,

    Why don't you use the Has New Keys condition over the {relationship, dependent name, ss#, birthdate, and disability flag} set of fields, while removing the phone # from the infoset query?

    SueS
    Private
    Private
    Basic Member
    (43 points)
    Basic Member
    Posts:19


    Send Message:

    --
    01/10/2013 6:38 AM
    That's just it. The phone # is not part of the query. Only employee #, relationship, dependent name, birthdate, ss#, disability flag and user id are in the query.

    The user id is the only item in the query that changed and that is defined as an attribute.
    David Williams
    Private
    Private
    Veteran Member
    (3022 points)
    Veteran Member
    Posts:1018


    Send Message:

    --
    01/10/2013 8:21 AM
    Are you using the Has New Keys condition that Will suggested?
    David Williams
    SueS
    Private
    Private
    Basic Member
    (43 points)
    Basic Member
    Posts:19


    Send Message:

    --
    01/10/2013 8:40 AM
    Yes, I am using new keys which is okay. Also using Items no longer in data. This is the one that is causing the issue.
    Matthew Nye
    Private
    Private
    Veteran Member
    (1532 points)
    Veteran Member
    Posts:514


    Send Message:

    --
    01/10/2013 9:09 AM
    Sue,

    Using the "Has New Items" and "Items No Longer in Data" is difficult. keep in mind that these conditions are looking at items. An item is an Attribute or a Key. That would explain why youre seeing the row when the phone number is displayed.

    If you want to continue using this method I would say first create a multi fact with the fields you want to monitor. Then create your condition to look for "items no longer in the data". After that create a second multi-fact from the same infoset with the same fields as the first but add the attribute fields (Phone #, userid, etc). Now perform a Merge condition, merging your "Items no longer in the data" condition and the 2nd multi-fact. Youll then want to use your Table Tokens to suppress unwanted or duplicate columns. and dont show all the other tables.

    This should get you what you want but remember that the item based conditions are really touchy and you may still have issues if you dont have your unique key set correctly.

    hth
    Matt
    If any of my answers were helpful an endorsement on LinkedIn would be much appriciated! www.linkedin.com/pub/matthew-nye/1a/886/760/
    You are not authorized to post a reply.