Remove spaces while using concat

A

Andyoye

IP 2007

I have a text field who's value is based on :

concat(FieldA, " ", FieldB, " ", FieldC)

Question is: If FieldA and FieldB are empty, I end having blank spaces and
then value of FieldC. How can I put a condition or use substring to
eliminate the spaces?

tks
 
A

Andyoye

here is my formula for "Login Field" textbox

concat("Reassign to: ", LoginNames_1, LoginName_2, LoginName_3,
LoginNames_4, LoginNames_5)

If i leave LoginNames_1,2,3 & 4 blank and assign a value to field5, I get
leadind spaces when i assign "login Field" value to a string (ComboNames)

XPathNavigator frmLoginNames = this.CreateNavigator();

string ComboNames =
frmLoginNamest.SelectSingleNode("/my:myFields/my:group12/my:Login Field",
this.NamespaceManager).Value;
 
S

Shiva

Hello,

If you use normalized-space function it will remove more than one space
characters. But it will keep one space character if there are more than one.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top