The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to remove the empty space in the list type variable that is getting awhile doing a transform map

test1231998
Tera Contributor

Hi I have a list type field delegates in my user table  which iam updating via transform map

 

 

but while inserting in the list type field it is inserting a blank space like below in the beginning, How can this be removed

deepika46_0-1666203539124.png

Can anyone let me know how to remove this in the above script

can i use trim or slice ,if yes where should it be used

 

 

 

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, without any clear details of your configuration debugging results understanding your issue is not simple.

Perhaps you could share the specific details and results of your debugging of an impacted example.

I would also log the delegates array (as a string) at each step so that you can see the content and include start\end identifiers as this will help you see the white space entry if it exists at beginning or end of the array.

gs.info('|' + delegates.toString() + '|');

View solution in original post

5 REPLIES 5

Tony Chatfield1
Kilo Patron

Hi, without any clear details of your configuration debugging results understanding your issue is not simple.

Perhaps you could share the specific details and results of your debugging of an impacted example.

I would also log the delegates array (as a string) at each step so that you can see the content and include start\end identifiers as this will help you see the white space entry if it exists at beginning or end of the array.

gs.info('|' + delegates.toString() + '|');

Jace Benson
Mega Sage

Like @Tony Chatfield1, without more it's hard to help.

 

 

I'd suggest removing empty elements from your array, and maybe toString() it as well.  Good luck, if you still are stuck, share the output of the grDelegates.u_delegates value and the manager value so others can try to reproduce your problem.

Tony Chatfield1
Kilo Patron

Have you looked at xml file for an impacted record, is the highlighted sys_id visible in your delegates list?
Have you searched your sys_user table for the highlighted sys_id, does this record exist?

Perhaps it is a user record that does not have any display value and so shows as null in your list view?

 

hi @Tony Chatfield1 

 

yes i checked the highlighted sys id is  actually the sys id of the new empty record that is getting created in the sys user table,in the sys user table a new record is getting created with no user id

deepika46_0-1666254963636.png

 

and yes this is visible in delegates as empty record

i checked the excel it is not having empty records

below is my excel

deepika46_0-1666254327842.png