Hi All,
Can someone show me how to filter a repeating table with a date range (e.g
records added within the last 10 days) or the latest records (e.g. 5 latest
records). Any help would be greatly appreciated.
Thanks
Sandeep - 25 Jan 2006 06:50 GMT
Hi John S
Write this code in OnClick function.
This will give the records within the given date range.
This code is in C#..
string sQueryText = string.Empty;
string toid = getNodeValue("/dfs:myFields/my:Todate");
string fromid = getNodeValue("/dfs:myFields/my:Fromdate");
sQueryText = string.Format("select * from Table1 where name ='{0}' and date
between '{1}' ", toid, fromid);
ADOAdapter2 table1Adapter = (ADOAdapter2)
thisXDocument.DataAdapters["Table1"];
table1Adapter.Command = sQueryText;
table1Adapter.Query();
I hope this will help U

Signature
Sandeep
www.autonomysystems.com
S.Y.M. Wong-A-Ton - 09 Apr 2006 12:17 GMT
I've put together a solution (see
http://enterprise-solutions.swits.net/infopath/filter-repeating-table-date-range
-rules.htm)
where you can specify two dates using date pickers and then use these dates
to filter records in a repeating table using nothing else but rules and
filters (no custom code).
---
S.Y.M. Wong-A-Ton
> Hi All,
>
[quoted text clipped - 3 lines]
>
> Thanks