You need to sign in to do that
Don't have an account?

HTMLENCODE(row[column]) doesn't work.. Any suggestions?
I have code to output rows and columns from a controller's data member (a SObject[] collection).
The code below works fine. It iterates throough each row in rpt.data, and through each column name in rpt.parsed_clean_field_names, and using a bracket notation, outputs the row[column] just fine.
<apex:repeat value="{!rpt.data}" var="row">
<apex:repeat value="{!rpt.parsed_clean_field_names}" var="header">
<apex:outputText value="{!row[header]}" escape="false"/>
</apex:repeat>
</apex:repeat>
But when I try to use HTMLENCODE to encode the data (since it may contain characters that I want encoded), I do this (the red bold is the only difference): and it breaks
<apex:repeat value="{!rpt.data}" var="row">
<apex:repeat value="{!rpt.parsed_clean_field_names}" var="header">
<apex:outputText value="{!HTMLENCODE(row[header])}" escape="false"/>
</apex:repeat>
</apex:repeat>
with the following error message:
Incorrect parameter type for function 'HTMLENCODE()'. Expected Text, received Boolean
Well not sure.
But can you try something like this
<apex:outputText value="{!HTMLENCODE(TEXT(row[header]))}" escape="false"/>
Good idea.. But it caused Salesforce itself to fail, and not even return a valid HTML page, with the following error. I've never seen this before. Any thoughts?
Thank you again for your patience and assistance. And thanks for using salesforce.com!
Error ID: 206456986-7913 (256181728)
I guess best way will be is to raise a ticket
It is also iterating over <apex:repeat></apex:repeat> over dymnic fields in object query.
Getting below error.
Incorrect parameter type for function 'HTMLENCODE()'. Expected Text, received Boolean