May 10, 20241 yr I'm looking for a function that will only trim spaces on the right side as I have fields where there may be some spaces padding on the left by design. I'd like to use this function as an auto-enter filter to remove spaces only from the right side of the incoming data.
May 10, 20241 yr 27 minutes ago, djc728 said: only trim spaces on the right side Here are just 2 ideas that spring to mind: Let ( [ lastChar = Right ( Trim ( text ) ; 1 ) ; lastPos = Position ( text ; lastChar ; Length ( text ) ; -1 ) ] ; Left ( text ; lastPos ) ) or: Let ( tmp = Trim ( "a" & text ) ; Replace ( tmp ; 1 ; 1 ; "" ) )
May 14, 20241 yr Author Thank you both »» I appreciate it. Love MonkeyBread and @Comment ( big fan ). Thanks.
May 14, 20241 yr MBS Plugin 14.2 was Released today: Your function wish is included: Text.LeftTrim Trims whitespace on the left side. All ✅ Server Text.RightTrim Trims whitespace on the right side. All ✅ Server
May 14, 20241 yr Author Thank you. Well I'll be a monkeys uncle. ( lol ). Appreciate it. We use the MBS plugin for a number of processes. I don't know what we'd do without it. Thanks for adding these 2 functions.
Create an account or sign in to comment