- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 08:04 PM
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;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 08:15 PM - edited 11-07-2023 08:38 PM
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 09:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 08:24 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 09:58 PM
@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);