Vishal Birajdar
Giga Sage

Hi @Leandro Oliveir 

 

Can you try using 'toString()' :

 

try {

        var userID = inputs.user.toString();   // use toString();

        if(userID.startsWith('00')) {
            inputs.user = userID;
            } else {
                inputs.user = '00' + inputs.user;
                }

 

 

Hi @Vishal Birajdar ,

I tried using toString() and it doesn't work. Still has the same problem: it passes directly to else condition.
The log shows like this:

LeandroOliveir_0-1699418142322.png

 

 

Hi @Leandro Oliveir 

 

If possible can you share screenshot of action with inputs...!!!

 

 

Bill Brown
Tera Contributor

I tried to reply before but it it did not seem to work. Did you try and write inputs.user to the log to see what data you are getting?

 

Sandeep Rajput
Tera Patron

@Leandro Oliveir Are you sure about passing the inputs in the following method. 

 var user = utils.getUser(inputs);

Not sure about the implementation of your getUser method but I am assuming it expects inputs.user

 var user = utils.getUser(inputs.user);

 

View solution in original post