none
Weird Set Behavior

    Question

  • version: FIM RTM (not update 1)

    Using the Export-FIMConfig with the -onlyBaseResources -CustomConfig switches I run the following query to see if there are any users without a DisplayName

    /Person[not(starts-with(DisplayName,''))]

    I found 20

    So then I created a set, called ~ People with no displayname, with that as the custom filter. I checked it doesn't violate any of the limitations listed in the Business Policy Modeling doc

    Then when I look at the Set and click view members on the criteria tab it shows 20 users. So far so good

    But when I go to Search for users and it Resource ID in ~ People with no displayname it shows me over 10,000

    Indeed using the commandlet to run this query /Person[ObjectID=/Set[DisplayName='~ People with no displayname']/ComputedMember]") I get over 10,000

    Anybody else seen this behavior?

     

     


    David Lundell www.ilmBestPractices.com
    Friday, May 28, 2010 5:57 AM

Answers

  • So,

    Sounds like you need to change the filter to  /Person[not(starts-with(DisplayName,'%'))]    (Assuming you do not have any people whose Display Name start with a %).

     

    -J

    Friday, May 28, 2010 3:14 PM
  • Thanks Michael for confirming and thanks Jeremy for the solution -- a way to check for Nulls in strings that works in sets.

    /Person[not(starts-with(DisplayName,'%'))]   

    In fact it appears that using the starts-with functions just like using the LIKE operator in T-SQL with an implied % at the end.

    I have test using the single wildcard character _ as well as ranges like [a-c] and other more complex patterns.

    not(starts-wth() appears to do a NOT LIKE '%' with the implied %. Since % will match anything as long as it is not null this effectively tests for null

     


    David Lundell www.ilmBestPractices.com
    Thursday, June 03, 2010 4:36 PM

All replies

  • Running FIM RTM with update 1, I confirm that this bug is still present.

    Comes from the XPath /Person[not(starts-with(DisplayName,''))] that is not supported by the filter builder. If you specify a text in the quotes such as 'A' (all user without A at the beginning of the displayName), then the search returns correct result.

     

    Friday, May 28, 2010 8:13 AM
  • So,

    Sounds like you need to change the filter to  /Person[not(starts-with(DisplayName,'%'))]    (Assuming you do not have any people whose Display Name start with a %).

     

    -J

    Friday, May 28, 2010 3:14 PM
  • Thanks Michael for confirming and thanks Jeremy for the solution -- a way to check for Nulls in strings that works in sets.

    /Person[not(starts-with(DisplayName,'%'))]   

    In fact it appears that using the starts-with functions just like using the LIKE operator in T-SQL with an implied % at the end.

    I have test using the single wildcard character _ as well as ranges like [a-c] and other more complex patterns.

    not(starts-wth() appears to do a NOT LIKE '%' with the implied %. Since % will match anything as long as it is not null this effectively tests for null

     


    David Lundell www.ilmBestPractices.com
    Thursday, June 03, 2010 4:36 PM
  • I can confirm that the starts-with does add a % to the end of whatever value you put in unless it is ''
    David Lundell www.ilmBestPractices.com
    Friday, June 04, 2010 7:51 AM