Problem using "matches pattern" as a filter - InfoPath Dev
in

InfoPath Dev

Problem using "matches pattern" as a filter

Last post 11-10-2011 05:38 AM by rcant. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-23-2006 07:09 AM

    • pcapsey
    • Not Ranked
    • Joined on 02-14-2006
    • Ireland
    • Posts 9

    Problem using "matches pattern" as a filter

    Hi all,

    I've come across a problem with using the condition "does not match pattern" or "matches pattern" in a filter on a repeating table when switching views.

    I have an initial view, from which the user selects the criteria to query the database. In this case it is a document number, selected from a dropdown list. Once the user has selected the document number and clicked the Query button, the form opens a second view with a repeating table. This table displays all documents that have the selected document number assigned to them.

    I want to filter these documents so that a subset is displayed. I go into Repeating Table Properties > Display > Filter Data, and add the following filter:

    Document_Revision does not match pattern Custom Pattern A

    This should display any document that does not have the revision field set to a single alphabetic character. When I open the form, I get the following error message:

    "InfoPath cannot open the following view: PF_CDM_Summary
    The XSL transform for the View XSL failed.

    InfoPath
    InfoPath has encountered an error. The operation failed.
    A script error occurred.

    The following call failed: Ut...

    Error occurred during a call to property or method 'Match'."


    I don't have any custom scripts in the form. I got the same error when I tried to display an expression box to count the number of records displayed, with a similar filter as part of the Count function.

    I'm not sure if this is a bug in InfoPath or a problem with my form. I've achieved the required functionality by going into Repeating Table Properties > Conditional Formatting and using the same filter, which suggests to me it's a bug!

    I Googled the error and only got one hit, and that didn't have a solution. I'm using InfoPath 2003 SP2 with an Access 2003 database and Windows 2000 Professional SP4.

    Regards,

    Pete
  • 05-24-2006 03:58 AM In reply to

    • pcapsey
    • Not Ranked
    • Joined on 02-14-2006
    • Ireland
    • Posts 9

    Re: Problem using "matches pattern" as a filter

    Hi,

    I think I've found out why I'm getting the above error message.

    When I set up the filter, I use the pattern \p{L}, which translates as any letter. This gives the filter shown in my original message, namely:

    Document_Revision does not match pattern Custom Pattern A

    When I preview the form I get the error message.

    When I look at the filter, the condition has changed to:

    Document_Revision does not match pattern Custom Pattern: Invalid Pattern

    When I check the pattern, it has changed to \p, which is invalid.

    It doesn't happen every time I preview the form, and I haven't been able to identify the action that triggers the change to the filter pattern - not that the filter pattern should change at all. It happens using both filters and conditional formatting on repeating tables.

    Regards,

    Pete
  • 11-10-2011 05:38 AM In reply to

    • rcant
    • Top 500 Contributor
      Male
    • Joined on 03-24-2008
    • Rochester
    • Posts 27

    Re: Problem using "matches pattern" as a filter

    did you find a solution to this issue?

    i have a similar situation

    If setup Conditional Formatttion using any letter \p{L} -- it ends up falining  -- ie. field1 matches pattern \d\d-\p{L}  (then hide a section)

    test it in preview and workd fine!

    However,  Then in design mode i switch views then go back to that conditional formatting --  it reads:  field1 matches pattern invalid pattern

    now the formatting obviously fails

     apparently there is a bug of sorts when using  \p{L} in condition formatting

     has anyone seen this or know of a work around??

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.