Hi I am trying to remove space Infront of 9 as shown in below image
I tried with trim but still the space is coming < can anyone help me with this?Attached my code in this message
a!localVariables( local!allocatedLoads: rule!PLSB_QR_queryAllocatedLoadsForDashboard(allocatedId: 2058), local!vin:trim(local!allocatedLoads['recordType!{e48e7749-5c4f-4ece-89a1-1f096042fbc5}PLSB Allocated Loads.fields.{e79eb6a6-7005-42cb-ae7e-72dcb80c9d34}vinNo'][1]), local!vin )
Discussion posts and replies are publicly visible
Did you try clean?
docs.appian.com/.../fnc_text_clean.html
Depends on what is the value. It is going to be a sentence where you only want to remove extra spaces but would want keep the right number of space between every word, then like Mathieu said, you can go with clean.
But if you want to remove all the spaces, no matter what, then substitute can help you.
hi Vattikundala Dinesh ,
you can also use the trim() function to remove the unwanted spaces.
i'd actually suggest trim()... it's specifically for this sort of thing TBH.
fn!clean() will not remove a single space, it will only reduce multiple spaces down to 1 (as far as spaces specifically are concerned).
Otherwise my favorite for this type of use case is fn!stripwith()
stripwith(" 01234"," ")
He already tried using trim() and it didn't work which is why I assumed there were non-printable spaces in there.
i.e. www.namecheap.com/.../
a!localVariables( local!nonPrintableSpaces: { " ", " ", " ", " ", " ", " ", " ", " ", " " }, local!characterString: concat(local!nonPrintableSpaces), local!trim: trim(local!characterString), local!stripPlusTrim: stripwith(local!trim," "), local!cleanPlusTrim: clean(local!trim), { characterCodes: code(local!nonPrintableSpaces), trim: local!trim, stripPlusTrim: local!stripPlusTrim, cleanPlusTrim: local!cleanPlusTrim } )
Mathieu Drouin said:He already tried using trim()
Oof, somehow I'd missed that.