cancel
Showing results for 
Search instead for 
Did you mean: 

How to move negative sign from back to front

Former Member
0 Kudos

Hi All,

In PI 7.1, If some value are coming in with negative sign at the back, then how to bring the negative sign to front of the value.

eg:

Input   :  6,718.21-

Output : -6718.210000

Please help.

Thanks & Regards,

Vinoth

Accepted Solutions (1)

Accepted Solutions (1)

vijender_p
Active Participant
0 Kudos

Hi Vinoth,

You can build these logic through Node functions .

for the value of input field map these with the first argument of replace string and for the second argument use - at the constant and BLANK ( constant ) for the third argument .

and map these with equalS function with the negative constant .

Best Regards,

vijender

Former Member
0 Kudos

Hi Vijender,

Thanks for your reply.

I have used two replace string nodes to separate "-" & "," and used If condition for identifying "-" and it worked. whenever values ends with "-" then it will add "-" in front of the value.

Thanks & Regards,

Vinoth

vijender_p
Active Participant
0 Kudos

Hi vinoth,

can you please close the issue .

Best regards,

vijender

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vinoth,

You can use replaceString function to remove '-' then use concat function to add '-' at the start.

Regards,

Raye

Former Member
0 Kudos

Hi Raye,

Thanks for your reply. It worked.

Regards,

Vinoth