Llyr Posted September 1, 2023 Share Posted September 1, 2023 Hi, Hope someone can help. I'm looking for a way to check a field to see if there are any special characters in it and if there are that they get removed. THanks llyr Link to comment Share on other sites More sharing options...
James Ainsworth Posted September 1, 2023 Share Posted September 1, 2023 Hi @Llyr Thanks for your post. In some places, validation can be added to control what is initially entered into a field. There are also some string utilities that can be used in a workflow that could be used. However, I probably need a bit more information about the scenario that you are looking at. Is there a particular field that you are looking at and how is this field currently being populated? Link to comment Share on other sites More sharing options...
Llyr Posted September 5, 2023 Author Share Posted September 5, 2023 Thanks for coming back to me James. The field i have in question is a surname for any new starters to our organisation. We are now using ITOM to create our new starter in Active Directory. We have been getting error recently when a surname include special Characters, we use the information to creating the email address. I didn't really want to use validation when names are entered in the ICF as the same field is used to create the display name and there is no issues with Special characters there. So my idea was to do a check on the Surname for special characters and remove it before getting to our ITOM stage. Link to comment Share on other sites More sharing options...
James Ainsworth Posted September 5, 2023 Share Posted September 5, 2023 Hi @Llyr In the BPM there are some string utilities. There isn't a single one that on its own would go and strip out all special characters. However, there may be a combination of these that may be able to do some of this. I've done a test using the Replace Task with the settings below which successfully removed an apostrophe from the middle of a string. This is limited to only being able to test for one character at a time, but if you know which character is causing the most issues, this should help. Use a Get Information automation to read in the surname from where you have it stored. Use the variable that holds the surname and add it to the Input Text. Add the character that you want to remove in the Search String field Set the Replace With to Manual and don't add any value to the field Have another Hornbill Automation that takes the result of the Replace automation and update the request with the new value. Let me know if that helps or if you need more information to set this up. Link to comment Share on other sites More sharing options...
Llyr Posted September 8, 2023 Author Share Posted September 8, 2023 Thank you for this, i will make some tests and let you know how i get on. Link to comment Share on other sites More sharing options...
Llyr Posted September 8, 2023 Author Share Posted September 8, 2023 If i wanted to remove a space, how would i define the space in the in search string field? Link to comment Share on other sites More sharing options...
James Ainsworth Posted September 9, 2023 Share Posted September 9, 2023 Hi @Llyr There isn't currently a way to do this. However our development team have added a feature to allow for this. This should be available in the next platform update. Keep an eye out for the release notes. 1 Link to comment Share on other sites More sharing options...
James Ainsworth Posted September 13, 2023 Share Posted September 13, 2023 Hi @Llyr This ability to remove spaces should now be available to you. In the Search String field you will need to enter {{space}} Link to comment Share on other sites More sharing options...
Llyr Posted September 14, 2023 Author Share Posted September 14, 2023 That is great new, thanks Link to comment Share on other sites More sharing options...
Sam P Posted December 19, 2023 Share Posted December 19, 2023 @Llyr just out of interest, did you manage to get this working? To remove the space from a surname? I'm trying to achieve the same thing without much luck. @James Ainsworth any tips please thanks Link to comment Share on other sites More sharing options...
Llyr Posted December 20, 2023 Author Share Posted December 20, 2023 @Sam P If i remember i did get this to work, what i had to remember to do was update the field with the results of the Replace action and then do another Get information node before using the information. Link to comment Share on other sites More sharing options...
Sam P Posted December 21, 2023 Share Posted December 21, 2023 @Llyr thank you, I managed to get it working in the end 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now