From the J&J Archive 09/02/2005: . .Afternoon all . .Further to our heartfelt plea for some pick-list code to assist with a problem we are getting here at the mighty <???> in Newcastle we take pleasure in revealing to all who are interested the cause of the problem. . .Originally the People Group Keyflex was set up with about 9 segments. During the course of requirements gathering (ie throw 2 dice if you get 'snake-eyes' then the segment will actually be used...) it transpires that 3 of the segments are not required. . .So they are rendered inactive. All fine so far... except - prior to that assignments have been set up which have placed values in these soon-to-be-inactive segments therefore resulting in several distinct rows in the PAY_PEOPLE_GROUPS table (Remember that PAY_PEOPLE_GROUPS is a 'combination table' in that the table is only supposed to store unique combinations of segment values). A bit like this in fact: (5 segments only cos we can't be aŁ%ed to do 9) . .Ppl Grp Id Seg1 Seg2 Seg3 Seg4 Seg5 .123 A B C D E .456 A B C D X . .If Seg5 is then disabled in effect you have 2 rows in the table with an identical combination of *active* segment values - "A B C D". Not good as you start to see 'Exact Fetch returned too many rows' error messages cropping up during link creation involving people group criteria. . .So when segments are disabled we end up with 2 problems: . .1. We need to make sure all the assignments etc point to just one of those .combination rows. .2. We need to remove the 'duplicate' entry . .These 2 issues are true regardless of the kind of key-flexfield you're dealing with. . .Now in the light of this afternoon's events we have an additional problem specific to the people group: it seems that in this case we also need to null out any disabled segments with a non-null value. . .Why? Because when you create an element link involving people-group eligibility criteria part of the process is to populate the table PAY_ASSIGNMENT_LINK_USAGES_F based on what it finds in the people group segments - *except* that this process(pay_asg_link_usages_pkg.insert_ALU if you're that bothered) cares nothing about the enabled/disabled status of the segments merely that the segment values are not null! So when you go to the element entry screen for an employee you get really screwy results when you try and give the employee an element for which you think said employee is eligible yet it doesn't appear in the pick list. . .When you clear the inactive segments hey presto everything's tickety boo. . .This has been..... another..... Janet & John Public Service Announcement . .L+K .J+J . .NB There were responses to this message that offered the idea of making segments non-visible as opposed to 'disabled'. Apparently (according to other individuals!) the down-side of doing this is that Self-service falls over!


CT