web stats
Add element to CCDA - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 02-22-2018, 01:26 PM
gojoshi gojoshi is offline
OBX.1 Kenobi
Join Date: Jul 2013
Posts: 50
gojoshi is on a distinguished road
Default Add element to CCDA

I need to search for an element in a CCDA message and add it if it's missing. So for example if the elements should like like as shown below:
First elementSecond ElementThird Element

I am occasionally not reeving the second element.so IF and only IF the second element is missing then I would need to append it.

If anyone can help, it would be greatly appreciated.
Reply With Quote
Old 04-06-2018, 08:39 AM
martinan martinan is offline
Mirth Newb
Join Date: Sep 2015
Posts: 16
martinan is on a distinguished road

Without more details it's tough to give a detailed way to do exactly what you're asking for, but here's a basic example of what it sounds like you're looking for:

if(msg.testnodeB.length() == 0){
	msg.insertChildAfter(msg.testnodeA[0], <testnodeB/>);
inbound message
outbound message
Reply With Quote

ccda, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 09:26 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation