Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Xpath check
 Login/Join
 
Member
posted
Hi,

I am using iWay ISM 5.5,

I am trying to work out a condition which checks for presence of particular field in the transformer and maps it to the output.

root
child1 ABC /child1
child2 ABC /child2
/root

I am trying to use a IF condition like /root/child1 does have a value use that, else use /root/child2.

The IF condition works fine if the file contains /child1 under root,no matter the field is empty are not.

One such file contains

root
child2 ABC /child2
/root

Here lies the problem I am not getting the value of child2 as the child1 is not present.

Also i tried to using @Exists to check if child1 does exists use that, else child2, not working.

If the file doesn't contain child1 under root, I am not getting the value of child2

Please let me know if there is some way to get child2 value if the file doesnot contain child1

Syntax of the xml file i am using is correct, Above one is just a example.


iWay ISM 5.5/iWay ISM 6.0 on Windows.
 
Posts: 20 | Registered: April 11, 2011Report This Post
Gold member
posted Hide Post
Hi,
Can you use [CODE] tags around the XML in your post for clarity...

What conditional operator are you using in the IF statement in the first example that is working? '=' ? '!=' ? '=='?


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
 
Posts: 59 | Location: Birmingham, Blighty | Registered: October 30, 2007Report This Post
Member
posted Hide Post
Hi AdeH,
I am using iWay ISM 5.5(Transformer) on Windows 2003 server.

This is the original file,

<root>

<child1>ABC</child1>

<child2>123</child2>

</root>


Mapping condition is "If the string lenth of the expression root/child1 is != zero,then take the value root/child1, else take the value from root/child2".

This works fine is the file is of type above.
meaning I am getting the value ABC from the above IF condition.

But when the file is like this
<root>

<child2>123</child2>

</root>


that is without the child1 element,

The If condition resolves to false and it should take value from child2,this is not happening.

So I even tried the @Exists on child1 instead of string length check on child1, but I am not getting the value of child2.


iWay ISM 5.5/iWay ISM 6.0 on Windows.
 
Posts: 20 | Registered: April 11, 2011Report This Post
Member
posted Hide Post
I've noticed, that sometimes the transform functions do not work as they are supposed to in the mappings.

Create two elements,map one to child1 and second to child2, encapsulate them with invisible groups and set filters to show child1 group, if child1 exists( use @EXISTS function) and hide the child2 group, if child1 exists.


iWay Service Manager (6.0.1 - patch.62627)
DMC Version 7 Release 7
 
Posts: 12 | Registered: January 24, 2011Report This Post
Member
posted Hide Post
Thanks Igor,

Best option was to create two elements and also everything depends on the context setting on the group element.

The way it works in Transformer.


iWay ISM 5.5/iWay ISM 6.0 on Windows.
 
Posts: 20 | Registered: April 11, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders