cancel
Showing results for 
Search instead for 
Did you mean: 

Default in data type

Former Member
0 Kudos

hi experts ,

can anyone tell me the use of Default column while declaring free style data type....

thanks

Anup Banerjee

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

This default value you type there is automatically assigned to the field if no other value is specified:

  • By the sender system - for inbound messages
  • In the message mapping - for outbound messages

Hope this helps,
Greg

Former Member
0 Kudos

hi

thanks for the reply..

in my testing scenario i hv taken one field ( sender data type ) as default and assign some value .

but when i am testing message mapping with no value specified in that field that default value  is not passing to target message type.

thanks

anup banerjee

former_member184681
Active Contributor
0 Kudos

Honestly, I think it doesn't really work like that. If you specify no value in the mapping test - then there is simply no value. This "default" only works if the sender system provides no value - then PI adds the default before executing the mapping, so that it could be mapped properly to the target.

Former Member
0 Kudos

hi

thanks for your reply

on my message mapping test  i am passing that field as

<NAME/>

means no value specified , but it should be like this after execution  <NAME>test</NAME>

where test is default value..

m i correct ...?

thanks

anup banerjee

former_member184681
Active Contributor
0 Kudos

Again - I think not. The default value is not inserted during mapping, but before it. So when you only test the mapping - the default value is never inserted! In other words, it is only inserted for "real" messages, not the mapping tests.

In order to check how the default value is put by PI in the sender data, you should make an end-to-end test, leaving that particular field empty.

Regards,
Greg

Former Member
0 Kudos

hi ,

i have tested end to end as given

<NAME><NAME>

its not working

at pi end it will remove this tag

how should i pass leaving this particular field empty ?

thanks

anup banerjee

former_member184681
Active Contributor
0 Kudos

Try sending without this field at all. By sending <NAME></NAME>, you send an empty value, which is not the same as no value.

Former Member
0 Kudos

use Name ->mapbydefault (node function in graphical msg mapping) -> Name

Double click mapbydefault and put blank as value, then blank will sent to output Name.

Former Member
0 Kudos

Dear Rajeev,

thanks for your help.

my issue has solved...

thanks

anup banerjee

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anup,

Please do a little bit research before posting in SCN. By the way, Default  as the name indicates, provides the default value to the respective field.

Regards,

Samir