Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2006

Tip: Looking for answers? Try searching our database.

how to select items from list A that don't exist in list B

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vielka - 17 Jan 2006 14:58 GMT
I have two SharePoint list:
List A: list of events
List B: list of postmortems associated to events

Both lists have an event_id column, and every event may have an associated
postmortem.

I want a form with a drop down box that shows the list of events from "List
A" that don't have a postmortem associated in "List B", using the event_id
field.

I though the query should be something like:
not(@ID =
preceding::xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems/@event_id)

But infopath doesn't allow it.

How can I filter something like that?
Greg Collins [InfoPath MVP] - 17 Jan 2006 17:21 GMT
Try your xpath without the "preceding::" part. You cannot call xdXDocument is not valid as part of preceding::

not(@ID = xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems/@event_id)

This still may not work, but I'm not positive that it won't. It is possible that this will compare against all postmortem IDs... or it might just compare against the first ID. If it doesn't work, you can try something like:

not(xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems@event_id[. = current()/@ID])

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

I have two SharePoint list:
List A: list of events
List B: list of postmortems associated to events

Both lists have an event_id column, and every event may have an associated
postmortem.

I want a form with a drop down box that shows the list of events from "List
A" that don't have a postmortem associated in "List B", using the event_id
field.

I though the query should be something like:
not(@ID =
preceding::xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems/@event_id)

But infopath doesn't allow it.

How can I filter something like that?
Vielka - 17 Jan 2006 20:08 GMT
Thanks a lot, it worked without the "preceding::" part.

I'm using:
@ID = not(@ID = /dfs:myFields/dfs:dataFields/dfs:Postmortems/@event_id)

Try your xpath without the "preceding::" part. You cannot call xdXDocument
is not valid as part of preceding::

not(@ID =
xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems/@event_id)

This still may not work, but I'm not positive that it won't. It is possible
that this will compare against all postmortem IDs... or it might just
compare against the first ID. If it doesn't work, you can try something
like:

not(xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems@event_id[.
= current()/@ID])

Signature

Greg Collins [InfoPath MVP]
Visit http://www.InfoPathDev.com

I have two SharePoint list:
List A: list of events
List B: list of postmortems associated to events

Both lists have an event_id column, and every event may have an associated
postmortem.

I want a form with a drop down box that shows the list of events from "List
A" that don't have a postmortem associated in "List B", using the event_id
field.

I though the query should be something like:
not(@ID =
preceding::xdXDocument:GetDOM("Postmortems")/dfs:myFields/dfs:dataFields/dfs:Postmortems/@event_id)

But infopath doesn't allow it.

How can I filter something like that?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.