none
FIM 2010R2 regular expression restrictions for drop-down list RRS feed

  • Question

  • I need DropDownList with list of Exchange Mailbox databases in "Configuration for User Editing" RCDC.
    So I bind ItemSource of DropDownList to MailboxDatabase.LocalizedAllowedValues in RCDC.
    And fill validation string pattern of "MailboxDatabase" attrbute with following regex:
    ^(base|base_2)?$ 
    If regex contains only letters, digits and "_" as above it works great, but...
    If regex contains dashes or special characters it doesn't work.
    Something like ^(base|base-2)?$ or ^(base|base%2)?$ just doesn't work, drop-down list is empty.
    I tried screen dashes and special characters with backslash - no success.
    Is there any way to see dash in FIM drop-down list through LocalizedAllowedValues?


    Tuesday, April 29, 2014 11:06 AM

Answers

  • Hello,

    If you want to use the String regex validation in a Drop down list, you need to avoid special chars of regex like '-','.','?','$','|', etc... in your values, because FIM would interpret them. Try to use Constant Specifier object if you want to display 'Based-2' instead of 'based2' constant value.

    Regards,


    Sylvain

    Tuesday, April 29, 2014 11:42 AM

All replies

  • Hello,

    If you want to use the String regex validation in a Drop down list, you need to avoid special chars of regex like '-','.','?','$','|', etc... in your values, because FIM would interpret them. Try to use Constant Specifier object if you want to display 'Based-2' instead of 'based2' constant value.

    Regards,


    Sylvain

    Tuesday, April 29, 2014 11:42 AM
  • Thank you for your reply Sylvain.

    Can you explain a bit more what do you mean under "use Constant Specifier object"?

    If use static drop-down list with definition in RCDC xml, in this way I can't see changes in RCDC after change xml till Forefront service restart,. So that I can't update list dynamically

    Tuesday, April 29, 2014 12:36 PM
  • You can access to constant specifier through "All resources" page.

    Here the example for the "Full Time Employee", Key (one of define string in the regex) and Display name (value to display) are the same but in your case, it wiil be:

    Key: Based2

    DisplayName: Based-2

    and also, change the attribute type and object :)

    Be aware that with String regex validation, you still need to do an IISRESET to view the changes in the form


    Sylvain



    • Edited by Sylvain.c Tuesday, April 29, 2014 1:33 PM
    Tuesday, April 29, 2014 1:32 PM
  • It works. Thank you for the help Sylvain!

    Wednesday, April 30, 2014 8:23 AM