Trading Network Document Type

Hi All
I want to define a document type in TN with the Identify query tab having any of the two values. For example I have to identify a document on the status type. If status type is ‘A’ or ‘B’ document should be a Purchase Order. If status type is ‘C’ then document should be Purchase Order Change. I already defined one Document with identifying query PurchaseOrder/@PurchaseOrderStatusType and value is equal to ‘C’. How can I define Purchase Order with status type either ‘A’ or ‘B’? Can I use the OR operator in the value field of identify tab?


Assuming a document structure like this:


The identifying query would be:

/roottag[status='A' or status='B']

This will match if the value of status is A or B.

Thanks Rob. In doctype identify tab I am getting two textbox …one for query and other for value.Can I enter /roottag/status in Query and ‘A’ or ‘B’ in value. Will it work?

No it will not work. Place the query as listed in my first post in the Query field and nothing in the Value field.

Thanka Rob

Hi Rob
When I tried to give the following query I got an error to save that query
/PurchaseOrder[0]/@PurchaseOrderStatusType[‘Amended’ or ‘Cancelled’]

The value field was blank.

Any Idea why?


The syntax isn’t quite right. Try this in the Query field:

/PurchaseOrder[@PurchaseOrderStatusType=‘Amended’ or @PurchaseOrderStatusType=‘Cancelled’]

Leave the Value field empty. Let me know if this doesn’t work.

Thanks a lot Rob. Yes its working.


How would I say negative of some value in the Identifying query. Like my xml comes in as:

<12345> (!-- This is the *body of the roottag)

and I want to create a query to say if /roottag/@type ‘A’ is not equal to ‘12345’

Thanks for your help

I was able to create a query with the help of website.

Thanks any way