Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 dmohanty
		
			dmohanty
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have a concatenated field like this below -
Country & ' ' & Currency & ' ' & Population as Field
But the value is coming as below, which I don't want -
United States of America USD 321.4 million
India INR 1.311 billion
Rather, I need with some evenly space like this below - 
| United States of America | USD | 
 | 
| India | INR | 
 | 
How can this be achieved - either in Load Script or List Box Expression?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can try this with a monospaced font
Table:
LOAD *,
Len(Country) as LenCountry,
Len(Currency) as LenCurrency,
Len(Population) as LenPopulation;
LOAD * INLINE [
Country, Currency, Population
United States of America, USD, 321.4 million
India, INR, 1.311 billion
];
Left Join (Table)
LOAD Max(LenCountry) as MaxLenCountry,
Max(LenCurrency) as MaxLenCurrency,
Max(LenPopulation) as MaxLenPopulation
Resident Table;
FinalTable:
LOAD Country,
Currency,
Population,
Country & Repeat(' ', (MaxLenCountry - LenCountry + 3)) & Currency & Repeat(' ', (MaxLenCurrency - LenCurrency + 3)) & Population as Field
Resident Table;
DROP Table Table;
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You can try this with a monospaced font
Table:
LOAD *,
Len(Country) as LenCountry,
Len(Currency) as LenCurrency,
Len(Population) as LenPopulation;
LOAD * INLINE [
Country, Currency, Population
United States of America, USD, 321.4 million
India, INR, 1.311 billion
];
Left Join (Table)
LOAD Max(LenCountry) as MaxLenCountry,
Max(LenCurrency) as MaxLenCurrency,
Max(LenPopulation) as MaxLenPopulation
Resident Table;
FinalTable:
LOAD Country,
Currency,
Population,
Country & Repeat(' ', (MaxLenCountry - LenCountry + 3)) & Currency & Repeat(' ', (MaxLenCurrency - LenCurrency + 3)) & Population as Field
Resident Table;
DROP Table Table;
 
					
				
		
 dmohanty
		
			dmohanty
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hey buddy,
This is great and appreciated.
However if I use just the Concatenated Field as a List Box, that again gives me uneven spaces. but in the table box that is fine.
The reason I want in a List Box - need to use them as LED Check boxes, which is not possible in table Box or Straight table.

 
					
				
		
 dmohanty
		
			dmohanty
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		stalwar1,
Ohh wait!
What is that mono spaced Font?
When I just use the Format painter from Table Box to List Box - I am able to get as desired.
How can I set that?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If I use monospaced font, then it seems to be working for me
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Read here:
 
					
				
		
 dmohanty
		
			dmohanty
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks stalwar1.
So the calculation to include the Max Length is used to Set the values in tabular format.
And then use the Monospaced font for the desired spacing.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
So the calculation to include the Max Length is used to Set the values in tabular format.
Not sure I understand this... but Max length of country is used to figure out how many spaces are needed for each of the rows so that the currency can line up.... similarly max length of currency is used to figure out how many spaces are needed for each of the row so that population can line up.
And then use the Monospaced font for the desired spacing.
this is true 
 
					
				
		
 dmohanty
		
			dmohanty
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		stalwar1,
Your explanation to my first query is correct.
A great help and learning! Thanks again.  
 
Regards!
