Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Community - Display "Yes" instead of boolean "true" - Apex Code Development - Force.com Discussion Boards

Started 1 month, 3 weeks ago by theitdeptrocks
Hi all, I'm returning a boolean value to a Visualforce page to indicate if a field is checked or not. On my object, that field says whether or not a user should be able to move on to a specific page. On my VF page, currently it is returning "true" or "false" as expected, however what I would like to do is: If the value is "true", return "<a href="mylink.html">Begin!</a>". ...
Site: Salesforce.com Community  Salesforce.com Community - site profile
Forum: Apex Code Development  Apex Code Development - forum profile
Total authors: 2 authors
Total thread posts: 5 posts
Thread activity: no new posts during last week
Domain info for: salesforce.com

Other posts in this thread:

prageeth replied 1 month, 2 weeks ago
Hello theitdeptrocks ; It is not mentioned in your question what is the field which returns the boolean value. I assume that the field is " Available_in_Portal_Can_Edit__ c". If this is the field you can print "yes" or "No" on the page as below. If this is not the answere for your question please try to supply more info. On VF page:...

theitdeptrocks replied 1 month, 2 weeks ago
Thanks prageeth, That's the correct variable alright, and it worked exactly as expected. Now, could I instead of returning 'YES' return a hyperlink? I tried doing this: <td align="center">{!IF(pn.Available_in_Portal_Can_Edi t__c, '<a href="http://server.salesforce.com/apex/my_page?pi d={!SelectedPlanID}&id={!pn.id}&cid={!TheSFContact ID}&atid={!pn.id}&aid={...

theitdeptrocks replied 1 month, 2 weeks ago
I was able to find a work around: <td align="center"><a href="myLink">{!IF(pn.Available_in_Portal_Can_Edit __c, 'Begin', '')}</td></a> Which will work in this instance by linking either the 'YES' or 'NO' to the same URL...but by not displaying a 'NO' there is nothing to click on. Not sure this was the best way to accomplish this, but what if I wanted to have 'YES' go to ...

prageeth replied 1 month, 2 weeks ago
Hi theitdeptrocks ; As I understood your question you want to have two different URLs to be redirected to according to the condition. If your requirement is this you can do something like below. <td align="center"> <a href="{!IF( pn.Available_in_Portal_Can_Edit__c , 'http://www.google.lk', http://www.salesforce.com')}"> {!IF( ...

 

Top contributing authors

Name
Posts
theitdeptrocks
3
user's latest post:
Community - Display...
Published (2009-11-12 09:44:00)
I was able to find a work around: &nbsp; &lt;td align=&quot;center&quot;&gt;&lt;a href=&quot;myLink&quot;&gt;{!IF(pn.Available_in_Portal_Can_Edit__c, 'Begin', '')}&lt;/td&gt;&lt;/a&gt; &nbsp; &nbsp;Which will work in this instance by linking either the 'YES' or 'NO' to the same URL...but by not displaying a 'NO' there is nothing to...
prageeth
2
user's latest post:
Community - Display...
Published (2009-11-12 20:26:00)
Hi theitdeptrocks ; As I understood your question you want to have two different URLs to be redirected to according to the condition. &nbsp;If your requirement is this you can do something like below. &nbsp; &nbsp; &lt;td align=&quot;center&quot;&gt; &lt;a href=&quot;{!IF( pn.Available_in_Portal_Can_Edit__c , 'http://www.google.lk', http://www.salesforce.com')}&quot;&gt; {!IF(...

Related threads on "Salesforce.com Community":

Related threads on other sites:

Thread profile page for "Community - Display "Yes" instead of boolean "true" - Apex Code Development - Force.com Discussion Boards" on http://www.salesforce.com. This report page is a snippet summary view from a single thread "Community - Display "Yes" instead of boolean "true" - Apex Code Development - Force.com Discussion Boards", located on the Message Board at http://www.salesforce.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity