none
Advanced Set Filter RRS feed

  • Question

  • Hello, 

    I try to create a set with a filter starts-with('*') the * is the literral caracter but I have an error that the filter is not supported. 

    Any solution for that, thx

    Friday, August 7, 2015 1:57 PM

All replies

  • I am not sure this would work, since asterisks have a special meaning. What is the attribute that contains this Asterisks?

    I am thinking for instance, if the value is "*Something" you can change it to "_*Something" or "Something". 


    Nosh Mernacaj, Identity Management Specialist

    Friday, August 7, 2015 2:30 PM
  • The default Schema Binding for Name on an AttributeTypeDescription should block you from creating attributes that start with an *

    What attribute are you trying to build the filter on?   You can do something like pseudo contains starts-with(DisplayName,'%*%') which does work in set, but it will produce results where the * is anywhere in the string not just starts with.

    I wouldn't recommend using * if possible


    ----- http://jeftek.com

    Friday, August 7, 2015 6:14 PM
  • Jef,

    I did not think it is the attribute that contains the * but the value.

    AccountName=*user1, for instance. This is how I understood it. If the attribute name existed with asterisks, it would not be a problem in filter creation, because that is simply a dropdown. He is trying to define a filter of <attributeName> Starts with <*>


    Nosh Mernacaj, Identity Management Specialist


    Friday, August 7, 2015 6:16 PM
  • Thanks for clarifying,  as I totally misread that :)

    Same thing is true though, the filter won't let you do starts-with(DisplayName,'*')

    however I believe you can do  starts-with(DisplayName,'[*]')

    I know there were some changes to literals back in the FIM 2010 R1 that i'd have to look at to verify though.

    Edit:  The scenario is listed in the FIM 2010 R2 Release notes:

    https://technet.microsoft.com/en-us/library/hh322889%28v=ws.10%29.aspx

    "FIM Portal: Wildcard character * is not supported in Filter builder"

    So that explains why you get the error in the filter builder.  in your case you don't want it to be a wildcard, which leads yo ut other item in the release notes:

    "FIM Service: Starts-With, and Ends-With searches on String and Text attributes are implemented using the TSQL LIKE operator with standard SQL wildcard behaviors
    This means that the following characters %, _, [, ^ are treated as wildcards (http://msdn.microsoft.com/en-us/library/ms179859.aspx). If your use cases require these characters to be treated as literals, then you must escape them per the TSQL LIKE documentation by enclosing the wildcard character in brackets."


    ----- http://jeftek.com


    Friday, August 7, 2015 10:29 PM
  • Sorry Jeff. Again you missinderstood. He is saying that the asterisk is a literal not wild card. :)

    Nosh Mernacaj, Identity Management Specialist

    Saturday, August 8, 2015 3:39 AM
  • Let me try and explain it again then :)

    The original request is to define a set where objects with SomeAttribute starts with the literal * value.

    Example value to find:  SomeAttribue='*SuperUsers"

    What will not work, because by default '*' is treated as a wildcard:

    starts-with(SomeAttribute,'*')

    What will work, because you are specifying it as a literal, so it is not treated as a Wildcard:

    starts-with(SomeAttribute,'[*]')

    (I provided the WHY in my previous post, so the point may not have been as clear)


    ----- http://jeftek.com

    • Proposed as answer by -Jeff Ingalls- Monday, August 10, 2015 7:29 PM
    Saturday, August 8, 2015 3:47 AM
  • Assuming you meant 'that' instead of 'what', you got it now and maybe your suggestion is spot on.

    Nosh Mernacaj, Identity Management Specialist

    Saturday, August 8, 2015 3:49 AM