• jayster4x
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi, within a VF page or PDF rendering, I need to replace/mimic php code used to evaluate some field(s) value and then display 'sections' of HTML / PDF accordingly.  Browsing other messages in the boards I am fairly certain I can do this with an IF formula and outputText or a table with conditional row rendering.  I am a certified adv. admin (successfully) plundering my way through the conversion of existing HTML for PDF rendering into VF email templates/attachments and PDFs ... until I hit the php code. 

 

I need some help defining:

1 - an approach to take.  Can I use multiple apex:outputText within one part of the IF formula?  Or should I create separate VF pages to hold the content needed in each condition and pull it into the page with <apex:insert> and <apex:composition>?  Or ...?

2 - if it is (easily) possible to replace the "num2words" conversion done in php -- ($0.20 is presented as "Twenty cents")? 

 

The page/PDF is a 'contract' template with a few merge fields inserted.  Within section '3', sub-sections, each nicely indented, the logic is:

 

IF "currency1__c "> 0 then display sub-sections a,b,c,d  and specific sections 5, 6 and 7 --- 'a' contains one merge field. 

     IF "fieldXYZ__c='abc' then display, within section 3, alternate sub-sections a,b,c,d, & e and "alternate" sections 5, and 7 -- with sub-section 'e' a variable defined for showing 2 increasing iterations of ('currency1__c'  * 0.5). 

 

ELSE -- show the same section 4 and 6, and the "original" sections 5 and 7.

 

-------

I could provide the existing php if my summary is unclear or incomplete.  The content ends up in PDFs only - not a page in a browser.

 

Thanks for any help provided here. I am open to someone else solving this for a fee ...

 

jayster4x

 

While going thru Trailhead and learning many things, I decided to put together my own version of yet another Trailhead Leader board. I've fleshed out an example that keeps track of Name, ID, Badges, Superbadges, Comm Badges and Total Points. Sorting, ID validation are also being done. I did all of this for my own edification and learning to better reinforce the skills that Trailhead provided me. Trailhead is really quite amazing

Link to Dev Org Public Site: http://trailhead-leaderboard-developer-edition.na35.force.com

This App is one VisualSource Page and Apex controller running as a Public Site. Refresh occurs periodically from a .Net Web App using the Partner WSDL API

I'm hoping to move all of that over to Apex once I figure out a bunch of things. I see some other suggestions about dates. It would be nice to incorporate that also. I'm sure that something like this could be incorporated into Salesforce Orgs for folks to keep track of training of their employees with Trailhead. Part of the loader I've built using the Partner WSDL scans thru all of the badges of a profile and can load them into the Org somewhere.

 
While going thru Trailhead and learning many things, I decided to put together my own version of yet another Trailhead Leader board. I've fleshed out an example that keeps track of Name, ID, Badges, Superbadges, Comm Badges and Total Points. Sorting, ID validation are also being done. I did all of this for my own edification and learning to better reinforce the skills that Trailhead provided me. Trailhead is really quite amazing

Link to Dev Org Public Site: http://trailhead-leaderboard-developer-edition.na35.force.com

This App is one VisualSource Page and Apex controller running as a Public Site. Refresh occurs periodically from a .Net Web App using the Partner WSDL API

I'm hoping to move all of that over to Apex once I figure out a bunch of things. I see some other suggestions about dates. It would be nice to incorporate that also. I'm sure that something like this could be incorporated into Salesforce Orgs for folks to keep track of training of their employees with Trailhead. Part of the loader I've built using the Partner WSDL scans thru all of the badges of a profile and can load them into the Org somewhere.