Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a concat statement where I need to show 3 fields in a text box well aligned. Can anyone please help me with this?
Attached is the sample qvw.
You can try this, but this isn't perfect also:
=Concat(DISTINCT Name&' | '&Dept&Repeat(' ', Aggr(Max(TOTAL Len(Dept)) - Len(Dept), Dept))&' | '&Location,Chr(10))
Hi Reshma, you can use something like:
=Concat(DISTINCT Name& Repeat(' ', 20-Len(Name)) & ' | '&Dept& Repeat(' ', 10-Len(Dept)) &' | '&Location,Chr(10))
//Change '20' and '10' the the max length value for each field.
But unsless you use a monospaced font like courier it wouldn't work as each character can have a different width.
What I am doing here is to find the max length of the dept and then repeat an empty space for difference in length of each department.
So, for example, since sales is 5 character long and HR is 2 character, the above expressions adds 3 extra spaces in the text box
Changing it to Courier did help
Thank you for your help Sunny. I am actually trying to implement this in the alert section. My email alerts are unaligned.
I am actually trying to implement this in the alert section. My email alerts are unaligned.