You need to sign in to do that
Don't have an account?
Inserting field values that contain references to other field values
We have a data object that contains a field that we want to allow the user to specify an expression that includes values from other fields.
For example:
OurObj.linkPattern=http://google.com?Q={!Account.Name}
We then want to render a hyperlink in a visual force page that would emit:
<a href="http://google.com?Q=My Account Name">Search</a>
Here's what we have tried:
<apex:ouputLink value="{!OurObj.linkPattern}">Search</apex:outputLink>
This resolves to:
<a href="http://google.com?Q={!Account.name}">Search</a>
It seems like we need to double resolve the value somehow.
We are hoping for some suggestions from the community!
Thanks,
- K
IN your controller get a new variable say string x;
then:
OurObj.linkPattern=http://google.com?Q={!Account.Name} ;
x= OurObj.linkPattern ;
in VF page use:
<apex:ouputLink value="{!x}">Search</apex:outputLink>
We have tried this, and it does not work.
The resulting html has:
<a href="http://google.com?Q={!Account.Name}">
{!Account.Name} does not resolve to the actual value.