can you prgrammatically filter a repeating table - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

can you prgrammatically filter a repeating table

Last post 09-02-2004 12:02 PM by Greg Collins. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-02-2004 08:49 AM

    • Lee
    • Not Ranked
    • Joined on 07-23-2004
    • United Kingdom
    • Posts 18

    can you prgrammatically filter a repeating table

    Hi,

    I have a project schedule being displayed in a repeating table. above the table i have 4 buttons: Overdue Tasks, Due Tasks, Complete Tasks and All Tasks. what i need to do is filter the table depending on which button was pressed.

    I know how the filters need to work, and i know how to get the table id from the view.xsl i just dont know how to apply the filter, or is there an easier way?

    cheers

    Lee

    Lee A Newson
  • 09-02-2004 12:02 PM In reply to

    Re: can you prgrammatically filter a repeating table

    Your task should be fairly easy and straight forward. What you need to do is set up a field, preferrably in a secondary data source, which is your filter field.

    Let's assume the following:
    • TaskFilter is the name of your filter field.

    • The values 0, 1, 2 represent Overdue, Due and Completed tasks respectively.

    • Status is the name of the field holding the status of each task.

    • btnOverdue, btnDue, btnComplete and btnAll are the IDs for your buttons.

    Here is what you would do to get your buttons working to auto-filter your table.

    Set up the filter on your table:
    1. Add a filter to your table with the following two conditions:
      • TaskFilter, Is Blank

      • OR

      • Status, Is Equal To, TaskFilter

    2. Clear the Show Filter Icon To Indicate Filtered Items checkbox.

    Create rules for your buttons:
    1. Create a Rule for btnOverdue which sets the value of TaskFilter to 0.

    2. Create a Rule for btnDue which sets the value of TaskFilter to 1.

    3. Create a Rule for btnComplete which sets the value of TaskFilter to 2.

    4. Create a Rule for btnAll which clears the value of TaskFilter.


    Do not add the TaskFilter field into the view -- this is strictly for behind the scenes.

    Preview your form and test your buttons.


    Greg Collins [InfoPath MVP]
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.