Advanced Set Filter

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

August 7th, 2015 9:59am

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". 

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 10:32am

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

August 7th, 2015 2:15pm

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 <

Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 2:18pm

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."

August 7th, 2015 6:31pm

Sorry Jeff. Again you missinderstood. He is saying that the asterisk is a literal not wild card. :)
Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 11:41pm

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)

August 7th, 2015 11:49pm

Assuming you meant 'that' instead of 'what', you got it now and maybe your suggestion is spot on.
Free Windows Admin Tool Kit Click here and download it now
August 7th, 2015 11:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics