cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
hotwheelzffx1
Nintex Newbie

Multiple Columns in List Lookup with HTML

Jump to solution

For I've seen in other posts how to pull multiple columns from a SharePoint list by using a calculated column. Eg., =CONCATENATE([Title],",",[First Name], ",", [Last Name])

 

I would like the presentation to be a table via:

=CONCATENATE("<table><tr><td>[Title],"</td><td>",[First Name], "</td><td>", [Last Name],"</td></tr></table>")

 

Is there a way for the form to render this HTML? XMLEncode doesn't work in the List column name field to pull.

 

Or is there another method, via javascript, to replace/render the DOM when this is run?

 

Labels: (1)
Tags (1)
0 Kudos
Reply
4 Replies
emha
Nintex Newbie

Re: Multiple Columns in List Lookup with HTML

Jump to solution

HTML itself doesn't support single dropdown (lookup) options to be a HTML snippets, it expects simple plain text.

 

you'd need to setup your calculated list field's formula so that it alligns parts of content at specific posistions, eg.

=CONCATENATE([First Name],REPT(" ",20-LEN([First Name])),[Last Name])
0 Kudos
Reply
hotwheelzffx1
Nintex Newbie

Re: Multiple Columns in List Lookup with HTML

Jump to solution
=CONCATENATE([First Name],REPT(" ",20-LEN([First Name])),[Last Name])

throws a #VALUE error.

This probably should be 20+LEN. However, it looks like spaces " " are invalid as it does not insert spaces between First and Last name columns. Using any other character, ".", does work, but doesn't really line up in even columns.  

0 Kudos
Reply
emha
Nintex Newbie

Re: Multiple Columns in List Lookup with HTML

Jump to solution

throws a #VALUE error.

I've tested the formula and it worked for me.

based on your site locale settings you might need to use semicolons in place of colons.

try to build the formula piece by piece to see what causes the error.

 

 

 

This probably should be 20+LEN

no, "20-LEN(...)" is very correct. it adds as many spaces as needed to make up first name 20 chars long, resp. start last name at 21 position.

 

 

 

 are invalid as it does not insert spaces between First and Last name columns

you have to use non breakable space character - ASCII(160) instead of simple space one so that rendering engine do not dense them

 

 

 

does work, but doesn't really line up in even columns.  

that might be caused by used font. with variable lenght font you'll not get anything better. you'd need to use fixed size font.
 
0 Kudos
Reply
hotwheelzffx1
Nintex Newbie

Re: Multiple Columns in List Lookup with HTML

Jump to solution

OK. Got it.

=CONCATENATE([First Name],REPT(" ",60-LEN([First Name])),[Last Name])

I did have to change the font (Courier in my instance) for this to line up.

I also pulled the the line above in Notepad++ and highlighted the space " " and replaced that with

alt-0,1,6,0 (on the numeric keypad) to change it to non-breaking.

0 Kudos
Reply