cancel
Showing results for 
Search instead for 
Did you mean: 

blank field need to replace by constant

Former Member
0 Kudos

Hi Experts,

I have one field which will have some times value and some time blank value so I wanted to replace blank field value from constant how can I achieve this.

Tx

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

If the field does not exist, mapWithDefault would work. If the field is blank, you can put an If-Else block.

former_member186851
Active Contributor
0 Kudos

Hello Ramesh,

you can use map with default function which will pass the actual value if value exists else whatever value you have mentioned will be passed.

or

you can compare the input value with blank constant if yes pass pass the required value else the actual value.

Former Member
0 Kudos

Hi Raghu,

Map with default will send empty tag to target side but in my case I wanted to send any hard coded value like 123 if the source will field is coming with blank.

Tx

maheswarareddykonda
Active Contributor
0 Kudos

try this

former_member186851
Active Contributor
0 Kudos

Hello Ramesh,

In map with default you give custom values as well.

Try this if the node itself wont come

or the node will come with blank value

Former Member
0 Kudos

Hi You can try something like this. you have to use exists command and if not exists then replace with constant. currently I don't have access to PI system so cannot give you graphical solution.

Former Member
0 Kudos

Hi Ashish,

in some cases I will get the value in that case I think i need to use if else.condition.

tx

Former Member
0 Kudos

Yes Ramesh. You are correct.

Thanks

former_member186851
Active Contributor
0 Kudos

Ramesh look in to the logic I mentioned it will work,