This topic is locked
[SOLVED]

 Replace Commas in Field View Page

4/19/2011 7:29:38 AM
ASPRunnerPro General questions
G
gdmacdo author

I have a field "Recommendations" that is a lookup field and displayed as a checkbox. I would like each of the selected entries to be displayed on their own line (new line) on the view page. On the view page, I have tried the field "View as" Custom and the following code from the manual :
strValue = Replace(strValue, ",","
") and tried strValue = Replace(strValue, ",","Stuff") to see if it was the html characters it would not recognize.
Any help or suggestions?

Sergey Kornilov admin 4/19/2011

Try this:

strValue=replace(strValue,",",vbcrlf)
G
gdmacdo author 4/20/2011

Unfortunately, That did not work. The commas are inserted by the system. Should there be something in the Before Display or modify the include\Recommendations_list.asp ?

Sergey Kornilov admin 4/20/2011

Commas are in the database, that's how multiselect lookup wizard values are stored. "System" doesn't insert anything.
I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

G
gdmacdo author 4/20/2011

A demo has been posted to the support site.



Commas are in the database, that's how multiselect lookup wizard values are stored. "System" doesn't insert anything.
I recommend to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

G
gdmacdo author 4/21/2011

Thank you, Elena. The solution you emailed me worked. I am posting your response to mark this topic closed.
in the "View page: Before display" event on the Events tab.

value_Recommendations = replace(values("Recommendations"),",","
")

xt.assign "Recommendations_value",value_Recommendations


*Note to display with bullets
you can replace the
in the above code with <li> to make your selections appear as a bulleted list; however, you need to edit the Visual Editor HTML code to add the following to your field name or the first item in your list will not have the bullet.
<LI>{$Recommendations_value}</LI>