Notifications
Announcements
Hey team,
I have a scenario in which I have a simple list form with various fields like firstname,lastname etc. Now I want to just remove spaces from the start and end of the FirstName and LastName. Eg: The name of an employee is Amaia Scott Delany. So, the FirstName is "Amaia" and Last Name is "Scott Delany" if the user is entering the FirstName as " Amaia " and Last Name as " Scott Delany". In this case I just want to trim the spaces from the start and and the end so it should save it in this way, FirstName: "Amaia" and LastName: "Scott Delany". The space between "Scott" and "Delany" should be maintained. Please can you help me achieve this using x++.
Hi SKD,
Are all of your names delimited by the first space between the firstname and lastname?
Please check the strScan method:docs.microsoft.com/.../xpp-string-run-time-functions
It will return the first occurrence of the text string mentioned in the parameters.
You can use strLTrim and strRTrim functions: docs.microsoft.com/.../xpp-string-run-time-functions
Or StrLRTrim from the Global class
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 763 Super User 2025 Season 2
André Arnaud de Cal... 413 Super User 2025 Season 2
Martin Dráb 284 Most Valuable Professional