I'm not sure that I get you. How can you recognize whether a software profile
is current or not? Are you saving an indicator field on the software profile?
And do you want to filter in SharePoint or in InfoPath?
---
S.Y.M. Wong-A-Ton
> hey! That's great! Thanks for the help.
>
[quoted text clipped - 129 lines]
> > > > > > Thanks!
> > > > > > JK
Thanks for the help...
First, the "current" attribute is set in SharePoint in a list called
SoftwareProfiles using a SharePoint checkbox.
When my InfoPath form opens, it gathers the items in the list into a
repeating table. I need it only to gather the items where Current is
checked. I don't want my users to be able to pick a software title that's
not current.
Second, I'm not quite getting the loop through code to delete all the nodes.
I get the code from your source that goes:
Set objXMLDOMElement = objDOMDocument.documentElement.firstChild
Set objRemovedElement =
objDOMDocument.documentElement.removeChild(objXMLDOMElement)
But I'm having trouble objDOMDocument. This repeating table is in my form's
main data source. I'm not sure how to get all the nodes in the group to loop
through and delete them.
Thanks again!
JK
> I'm not sure that I get you. How can you recognize whether a software profile
> is current or not? Are you saving an indicator field on the software profile?
[quoted text clipped - 135 lines]
> > > > > > > Thanks!
> > > > > > > JK
S.Y.M. Wong-A-Ton - 02 Mar 2006 22:00 GMT
Since the repeating table is in your Main data source, you can use the
"Filter Data..." option on the properties dialog box for the repeating table
to filter on "current".
You cannot use the code posted on www.topxml.com without modifying it to
suit your needs. "objDOMDocument" would be equivalent to the repeating group
node in your case (dfs:SoftwareProfiles I'm guessing). You need to build a
while loop checking whether hasChildNodes() on the group returns true. If it
does, retrieve the firstChild node on the group and then remove it from the
group. For information on the "while" statement in JScript, check out the
JScript reference at http://www.micrsoft.com/scripting
You could also use ExecuteAction with a "remove" action to delete a row in
the repeating table in pretty much the same way you used ExecuteAction to
"insert" a row.
---
S.Y.M. Wong-A-Ton
> Thanks for the help...
>
[quoted text clipped - 160 lines]
> > > > > > > > Thanks!
> > > > > > > > JK
S.Y.M. Wong-A-Ton - 02 Mar 2006 22:13 GMT
Additional info: You can use XDocument.View.SelectNodes (see
http://blogs.msdn.com/infopath/archive/2004/04/07/109189.aspx) to select all
the nodes in the repeating table, and then call ExecuteAction with a "remove"
to delete all the rows.
---
S.Y.M. Wong-A-Ton
> Thanks for the help...
>
[quoted text clipped - 160 lines]
> > > > > > > > Thanks!
> > > > > > > > JK
_bizon - 23 Mar 2006 22:54 GMT
InfoPath gets only what SharePoint list has in its' default view...
So the simplest approach is to create in WSS a view called current, make it
default and filter it there (careful with the item limit - you'll get just
the first 100 if this is the setting in the SharePoint view)...

Signature
Liviu
> Thanks for the help...
>
[quoted text clipped - 160 lines]
> > > > > > > > Thanks!
> > > > > > > > JK