Announcements
No record found.
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 609 Super User 2026 Season 1
Giorgio Bonacorsi 561
CP04-islander 383