How to allow the user to choose a range of rows?

S

Steve

I have a form that grabs data from a single table. I want to allow the user
to put in a date and have data for all rows that exceed that date be
returned. The table (of course) has a matching Date field.

This seems like a simple request...is it? Am i missing something simple?
Thanks for your help!
 
S

Steve

Thanks for your reply. I am not being clear and am learning as I go here,
and I have actually 2 related questions.

Consider a calendar table with 2000 rows...one row for each day...about 3
years back and 2 years in the future.
The first field is the date (never mind the time, but it can be 00:00:00)

1. If i 'apply a filter' to 'display' only certain rows ...say, after
today's date...do all the 5000 rows return from the server and INFOPATH just
displays the 'future' rows? (IF so, then we are not letting the SQL Server
do its work, and are using far more bandwidth than needed.)

2. Regardless of the answer to the above...I have a form with a "Query"
section and a 'Data' Section where the data is returned into a 'repeating
table'. I have the 'Date' field in both. I have applied a filter wherein
the 'data' date field is set to be >= 'query' date field. However, when
testing the form in Preview...the data is returned only for items where the
date EQUALS the value in the Query section of the form.

Has anyone else seen this behaviour...or what am i doing wrong?

Thanks in advance for your help.

"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
If you are using SQL or Access, this answer probably isn't for you -- or it
might be...

If you are using XML storage, you probably want to place a Filter on your
repeating table that only shows rows within the date range specified. You
may also want to include an "OR USER_DATE EQUALS BLANK" which will allow for
all table rows to show if a date has not been specified.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



I have a form that grabs data from a single table. I want to allow the user
to put in a date and have data for all rows that exceed that date be
returned. The table (of course) has a matching Date field.

This seems like a simple request...is it? Am i missing something simple?
Thanks for your help!
 
S

Steve

I have found the solution in Roger Jennings' fine book: "Introducing
Microsoft INfopath 2003".

See his page 258 for details...but in short... you have to "add a field" in
the Data Source task pane. Once I added this field "datafilter"...i was
able to compare the repeating table rows to this field and get the results i
was looking for.

Thanks for your earlier input.

"Greg Collins [MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in message
If you are using SQL or Access, this answer probably isn't for you -- or it
might be...

If you are using XML storage, you probably want to place a Filter on your
repeating table that only shows rows within the date range specified. You
may also want to include an "OR USER_DATE EQUALS BLANK" which will allow for
all table rows to show if a date has not been specified.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



I have a form that grabs data from a single table. I want to allow the user
to put in a date and have data for all rows that exceed that date be
returned. The table (of course) has a matching Date field.

This seems like a simple request...is it? Am i missing something simple?
Thanks for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top