Conditional Statement with Null Value - CoryPalme

05-Mar-07 04:22:03
I have a field that I need mapped to the output xml if it is not null.
Otherwise, I need to run a custom assembly and map the returned value from
that assembly to the output xml.

I can not seem to accomplish this.

Can someone else explain what I need to do to get this to work?

Thanks,
Cory
button
 
 

Conditional Statement with Null Value - Leonid Ganeline

05-Mar-07 06:13:24
use something like.. in your assembly code (in helper class)

myFunction(strung inputValue ,...)
if (inputValue == null)
return null;

make sure the high-level nodes do not interfere the mapping
--
Regards,

Leonid Ganeline

Microsoft Certified Technology Specialist: BizTalk Server 2006
http://geekswithblogs.net/leonidganeline/
button
 

Conditional Statement with Null Value - Benny Mathew

05-Mar-07 11:24:00
Hi Cory,
I think it is best to use inline C# code as below:

if(null)
call external assembly
else
map the field value

using other ways I am afraid will have to modify your external assembly.

--
Regards
Benny Mathew
Seamless Integration Solutions
BizTalk Consulting, Development, Training
Bangalore, India
http://www.seamless.in
http://GeeksWithBlogs.net/benny
button
 

Conditional Statement with Null Value - CoryPalme

06-Mar-07 10:40:10
So basically have one input parameter and do the following:

if (param1 == null)
{
val = externalassembly(param1);
return val;
}
else
return param1;

Whatever I return will be mapped to the output field?

Thanks,
Cory
button
 

Conditional Statement with Null Value - CoryPalme

06-Mar-07 10:42:13
Since the node looks like this when there is no value<node1 />, would I be
able to use the IsString functiod to check if there is a value?
button
 

Conditional Statement with Null Value - Benny Mathew

06-Mar-07 01:32:11
use the length function like this...
param1.trim().length() == 0;

--
Regards
Benny Mathew
Seamless Integration Solutions
BizTalk Consulting, Development, Training
Bangalore, India
http://www.seamless.in
http://GeeksWithBlogs.net/benny
button
 

Conditional Statement with Null Value - Leonid Ganeline

06-Mar-07 04:35:26
If use the string parameters it can save a lot of time.
Look at
BizTalk: Mapping: Script functoid: Type of the Input and output parameters
http://geekswithblogs.net/leonidganeline/archive/2007/01/08/103086.aspx

--
Regards,

Leonid Ganeline

Microsoft Certified Technology Specialist: BizTalk Server 2006
http://geekswithblogs.net/leonidganeline/
button
 
Thread pool starvation?