cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to map values from number to string in data collectors

Mohamed.Adel
Builder

Hello,

I have configured MIDC(Method Invocation Data Collectors) on an application, to collect the status of orders, but the value is in numbers, how can I map numbers to string to create a meaningful dashboard.

for example:
1 ==> "Pending"
2==> "Approved"
3==> "Rejected"

1 REPLY 1

Mario.Morelli
Architect

Hi Mohamed

 

you can use the replaceAll Function

 

.toString().replaceAll(1,Pending).replaceAll(2,Approved).replaceAll(3,Rejected)

 

Ciao



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A