How To Easily Separate Domain And User ID When Retrieving NT ID
The component called "Split Text Into Collection" allows you to get the Username and Domain, both in a single step:
The below will show how to set the properties for the "Split Text Into Collection" and then show a debug run as an example.
In this case my NT ID is: JardenCS\Andy and Get Current User generates a variable called v_CurrentUser.
- Insert Split Text Into Collection component after Get Current User and before the component where you will use the results on.
- Double-click to edit.
- Insert variable generated by Get Current User in the Text To Split field. In this case it is called: v_CurrentUser.
- Select Other as Delimiter.
- Enter \ in the Delimiter Text field.
- Enter the Output Variable Name. In this case I used: a_DomainAndUser.
- You can leave everything set as default (for this case).
For this case, I used the Display Content component inside the dialog workflow so you can see the results.
This is how your Domain and User variables would look like when browsing and inserting them in other components. Since the Domain is the first value before the \, it will display [first] right next to the variable name I selected (see a_DomainAndUser[first]) so, a_DomainAndUser[last] would be the Username:
When you debug your workflow, this is what you should get.
Hope this makes it easier when retrieving or separating your domain from user or vice versa.