cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Remove ID (characters) after Username

Jump to solution

Hello

I have a workflow which updates a Group or People field with 2 usernames.
The purpose is to show them in such a format:  Tom Jones; Alice Smith 

However, when extracting the list from to Excel then I see the following: Tome Jones;#57;#Alice Smith;#116

How can I make those characters disappear?
When looking at the list then the names are appearing correct without the ID's.

In the workflow I have a Build String as following:

The variable LogPurchManager is set to Text / Single Line.
I am not sure if that needs to be People or Group instead ??

I also got an Update Item function to update the Managers field:

Just wondering how would I remove those # ID's.

Labels: (2)
Tags (1)
0 Kudos
Reply
8 Replies
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

that's simply the way how sharepoint internally stored users in people&group field.

there is no way how you could get just user display names out of it.

if you need just display names stored them in simple text field.

0 Kudos
Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

Hmmm I then I am confused to why it works for one People or Group field but not for another!


I have another PoG field called Requester, which is updated with the Current User < and surprisingly the field does show the user's name as normal without any ;#ID afterwards. See the list settings:

Now this is in excel:

So, why does Requester not show the strange characters?

Yes, I have also data in Managers field where is one user and there is the ID's as well.

by the way, the LogPurchManager is set as text / single line.

0 Kudos
Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

that's sharepoint's behaviour....

if you enable multiple entries on person or group list field, sharepoint always outputs them with user IDs (even if the list field is populated with a single entry). if you do not enable multiple entries, then it outputs just display names.

I'm not sure what's the reason for the difference.

Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

I usually create variables in Text/SingleLine for usernames to be stored in... and was blaming that.
Now I am in middle created new variables for users as PoG in hope this may fix it but I doubt so

0 Kudos
Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

well, it's not black or white, one or the other.

working with user (entity) is not always so easy and straightforward.

one always have to consider each specific use case. and functionality and limitations of both sharepoint and nintex.

in this your specific case I'd kept user data in a person or group field and tried to clear user data after the export. you could eg. write a small macro that could do the job.

or you can built your own workflow that would do the export. within the workflow you would have full control over what's exactly exported and in which format.

Nintex Workflow - List to CSV UDA - Vadim Tabakman 

Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

Hi Maria

Thanks for your input.

Indeed, I have now created new variables for the Users and set it to People or Group field.
The only variable LogPurchManager is set to Text/Single Line instead of PoG ...

That variable is used in a Build String where I said concatenate two user names divide by ;
Not sure if that needs to be PoG as well?

Either way, as you said, all this has no impact and will not remove the ID's.
Indeed, when the Allow Multi-User is enabled that is where it inserts the ID number automatically.

As per the MACRO, sounds good idea BUT does it mean that the macro needs to be created for each list which is exported? From my understanding, every time you export it, it is there as temp and the data will not sync?

0 Kudos
Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

Not sure if that needs to be PoG as well?

workflow variable of type Person or Groups can store just single user account. so string variable is correct for this case.

 does it mean that the macro needs to be created for each list which is exported

no, it would single macro.

you just need to distribute it to all the users which will do exports, so that they can run it on their own after ach export.

Reply
Workflow Hero

Re: Remove ID (characters) after Username

Jump to solution

Ahhh, yes.
I was able to save the excel sheet to my desktop and then with the refresh button, it pulls down the latest info
Indeed, building a macro within the same file and then distributing it to the users is a good idea.

Now is time to dig some VBA coding for the macro lol

Cheers

Reply