Geeks With Blogs
Jeffrey's Blog .Net Developer

In my schema file, I have a choice element that only contains a single child element.  For example:

image

The above example is actually a crude schema of the where clause of a Sharepoint call to Lists.asmx where in the case I have only 1 item, I want to send a where clause of

<Where>
  <Eq>
    <FieldRef Name="ItemID"/>
    <Value Type="Text">99900</Value>
  </Eq>
</Where>

And in the case that I have multiple items, I want to send something like:

<Where>
  <Or>
    <Eq>
      <FieldRef Name="ItemID" />
      <Value Type="Text">3394</Value>
    </Eq>
...
    <Eq>
      <FieldRef Name="ItemID" />
      <Value Type="Text">9867</Value>
    </Eq>
  </Or>
</Where>

In my map, it is a simple operation of using

  • A Record Count functoid to receive a count of the number of items
  • A Greater Than functoid to compare the result of the count of items against 1
  • A Equal To functoid to compare the result of the count of items against 1

The map is then composed by connecting the items record in the source document to the Record Count functoid, the result of the Greater Than functoid to the Or choice element, and the result of the Equal To functoid to the Eq choice element.

Posted on Thursday, February 28, 2008 10:01 AM BizTalk , Sharepoint | Back to top


Comments on this post: BizTalk Map: Choice Element

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Chilberto | Powered by: GeeksWithBlogs.net