Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3221408
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:52:21+00:00 2026-05-17T15:52:21+00:00

A form is populated from a list and I need it filtered. I have

  • 0

A form is populated from a list and I need it filtered. I have a table with a date column and would like to display only the rows of the required month. For this I have used XPath filtering:

[((ddwrt:FormatDateTime(string(@MyDateColumn) ,1061 ,'MM'))=02)]

This gives me the results for February, all ok. Now what I am trying to achieve is to make the month selectable with a drop-down list:

<asp:DropDownList runat="server" id="DropDownList1">
        <asp:ListItem Selected="True" Value="01">January
        </asp:ListItem>
        <asp:ListItem Value="02">February</asp:ListItem>
    </asp:DropDownList>

The drop-down can also be a regular html select if it would help, no difference there. But how can I retrieve the chosen value of the select with XPath?

Trying to achieve this with XPath because SharePoint’s “regular” filtering only allows filtering by full date, not by day, month or year separately.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:52:22+00:00Added an answer on May 17, 2026 at 3:52 pm

    Ah great, my long answer and connection error! Being shorter this time:

    I just wanted to filter form/table rows by month. For this I created an ASP.NET Control DropDownList:

    <asp:DropDownList runat="server" id="DropDownList1" AutoPostBack="True">
            <asp:ListItem Value="01">January</asp:ListItem>
            <asp:ListItem Value="02">February</asp:ListItem>
            <asp:ListItem Value="03">March</asp:ListItem>
    
        </asp:DropDownList>
    

    Now to filter my DataFormWebPart by the date column, I first created a parameter. A parameter can be easily created when choosing Filter for the form and under the Value column choosing Create new parameter…. Just created a parameter MyParameter from Controls:DropDownList1. Now this parameter can be used in XPath filtering:

    [((ddwrt:FormatDateTime(string(@MyDateColumn) ,1061 ,'MM'))=$MyParameter)] 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an edit form, where the values are populated from the database. I
I have a table (in a form) populated with radio buttons (with a button
Say I have a form that contains a drop-down list populated by values stored
I have a simple 3-column ListView. This control is programatically populated with data from
using a drop-down list that's populated from database fields, i need to select an
My current setup: Form Dropdown List (populated by SQL) Users select an item from
I'm trying to populate a List of beans from a form: public class Foo
I have a form that is populated with dynamic form elements based on a
I have several radio buttons that are dynamically populated on a form and I
I have... a dynamic populated select box several input boxes a submit button form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.