About formatting data on the view of Visualforce pages.

learn more… | top users | synonyms

1
vote
1answer
26 views

Calculating the last day of next month using Ampscript

I'm looking to populate the last day of the following month for a promotion that we are running in an email. So, regardless of the current date, the promo will always end the last day of the following ...
2
votes
2answers
57 views

Conditional Cell Color in VF dataTable

I'm using a custom controller to query OpportunityFieldHistory to find changes to Close Date within a given timeframe. Then, the query results are displayed in a VF dataTable. I can display OldValue ...
1
vote
1answer
34 views

How to fix formatting in <apex:pageBlockSection

How can it be align to rest of the fields like how it has Start/End date... like to avoid using style like left-padding etc... Screen shot how it looks after it renders: Here is my VFP code that ...
4
votes
1answer
78 views

How to programmatically double apostrophes in custom label translations?

I have a custom label which contains a couple of parameters: Hello, {0} the other param is {1}. I wish to output this value in a Visualforce Page like so: <apex:variable var="firstParam" value="...
0
votes
2answers
98 views

Visualforce pageBlockTable - update values in cells on load

I've been developing a page that displays dollar amounts in a table, and allows updates to those amounts. This table is read from and writes to a JSON string. Some of these dollar amounts have many ...
2
votes
1answer
58 views

How to get default field formatting with outputText?

So I know I can just render a field with its default formatting using outputField: <apex:outputField value="{!MyObject__c.MyDate__c}" /> If I try to render the same field using outputText I ...
1
vote
1answer
101 views

Visualforce currency euro

I need to display currency. This field is Roll-up summary of formula fields with return type 'Number' <apex:outputText value="{0, number, currency}"> <apex:param value="{!Invoice....
0
votes
0answers
97 views

Error “You have sent us an Illegal URL or an improperly formatted request” while URL is correct

I get an error message when trying to access an automated URL. The message is You have sent us an Illegal URL or an improperly formatted request. The URL I try to reach is here and valid http:/...
1
vote
1answer
69 views

Why week of year is wrong?

I'm using this code : Time t = Time.newInstance(12, 0, 0, 0); DateTime dt = DateTime.newInstance(Date.parse('22/02/2016'), t); system.debug(LoggingLevel.WARN, Integer.valueof(dt.Format('w'))); It ...
0
votes
0answers
100 views

How could I do line breaks (/n or /r/n) on Messaging.SingleEmailMessage PlainTextBody?

I know this question is asked before and could found in the below links, (I am posting this as I want to post my code with some changes to the solutions provided in the below links.) PlainText email ...
0
votes
1answer
298 views

Trim/remove trailing zeros from decimal apex:inputfield

We have a decimal apex:inputfield that supports up to 12 decimal points; however most of our cases will not use more than 4-5 decimal points and we don't want to clutter the page with extra zeros. ...
0
votes
2answers
45 views

FormatNumber() always 2 decimal

I'm trying to show a number with 2 decimals, and no thousand "," mark. I have tried: %%[ Set @PointBalance = 2300 Set @FormatPoint = FormatNumber(@PointBalance,"N2") ]%% This gives 2,300.00. ...
2
votes
1answer
386 views

Datetime format ignores am/pm?

Hi I am new to apex coding and am trying to parse a datetime and then later on in my program I am trying to convert it back into a string to query items. For converting a string into a datetime I am ...
0
votes
1answer
221 views

Change Date Format in Formula Field

How do I change the format of a date in formula field? I want its data type to be a date. I want to change its format to 'MM-dd-YYYY' but I don't want to change user's locale settings. Is this ...
0
votes
1answer
121 views

Visualforce Date formatting in arbitrary Locale

So I know I can format dates like <apex:outputText value="{0, date, MMMM d',' yyyy}"> <apex:param value="{!contact.Birthdate}" /> </apex:outputText> and this outputs e.g. ...
0
votes
0answers
110 views

Multi-Select Picklist formatting - can i format just the arrows in between?

The Multiselect Picklist gives a box for all the possible values and a box for those items chosen. In between are 2 little arrows (left and right) to add or subtract items from the list of "Chosen" ...
1
vote
1answer
439 views

How to manage thousands separator for a number field on email template?

I would like to display the Purchase price with thousands separator : for example 16.00 24.96 3,316.57 the problem when I write this code : <apex:outputText value="{0,number, 0,000.00}"> ...
0
votes
1answer
240 views

VisualForce - JavaScript formatting of date returned using Remote Object retrieve

So using a remote object retrieve I am receiving a date in the following format: Wed May 06 2015 00:00:00 GMT-0700 (PDT) What's the best way to format this as MM/DD/YYYY using JavaScript?
1
vote
1answer
301 views

How to format currency in a visualforce page rendered as a PDF?

I have a visualforce page which contains currency field. When rendered as a PDF, it loses the format of the currency. How can I keep the currency format? I am using CSS to put the dollar sign in ...
0
votes
0answers
94 views

Where Clause in Query to match Phonenumber

How can I match for phonenumber in my whereclause? My query: SELECT id, Membership_number__c, Phone, Email FROM Contact WHERE Phone = :phoneNumberString Above mathces fine on these phonenumber ...
3
votes
1answer
321 views

Date formatting issue in Apex

I'm trying to format the date into specific format in Apex class, Desired result: 2015-05-19T18:52:30.937-07:00 By using SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); ...
3
votes
3answers
566 views

format the DateTime in an inputField

Is there a simple way to display the dateTime in an inputfield using an alternative dateTime Format? Or is there an easy way to display a datepicker when clicking in a normal textfield input?
2
votes
0answers
178 views

How to format/convert Phone Number fields to I164 format in Salesforce

I am looking for any recommendation on #phone number #cleanup on contacts. Is there any app which cleanup Salesforce contact phone number and put them in international format (I164), so that CTI can ...
3
votes
2answers
602 views

Format <apex:variable> used in VF page

need to know how to format in vf page. Im having variable to display total from chart. The total displayed need to have comma (ex:95,000) the below code can be used to format outputText. But ...
0
votes
1answer
34 views

Textarea that a user can use for formatting their imput text

I am creating a custom object, where a user needs to input a large amount of text. Is it possible to allow formatting of the text, i.e. display a list button, a bold and italics button etc? Tia.
1
vote
3answers
599 views

How to display two times from date/time column

I have two date/time fields which hold the duration of an event (i.e. start time = 11/11/14 12:00, end time = 11/11/14 18:00) I would like to display this as 12:00 - 18:00 on my force.com page, how ...
0
votes
0answers
258 views

show how to display date in visualforce page without using output text?

I am trying to display only the day from a date in visualforce page but i can't use output text ,please help me to achieve the task.
3
votes
1answer
1k views

How to format code in MavensMate?

Does anyone how to re-format code in MavensMate? If a plugin going hand in hand with MM exists, that'd be great as well.
0
votes
3answers
229 views

Date format issue

I have a visualforce calendar page which displays my date in correct Uk format (I am using the date function format()) with my Timezone as : (GMT+01:00) British Summer Time (Europe/London) , The ...
3
votes
2answers
296 views

Workaround for Possible Datetime.format() Framework Bug

I am generating a set of date-based keys by looping over a start date and adding successive months to the initial Datetime object. I seem to have run into a bug in the format() method of the Datetime ...
1
vote
2answers
922 views

Is it possible to exclude fields from inline editing?

With visualforce, I'm using <apex:inlineEditSupport /> inside e.g. <apex:pageBlockTable> quite often. It makes all outputFields editable. Fine. Now, is there a way to exclude some fields ...
3
votes
1answer
176 views

Formatting not working while writing the response to DOM through JS Remoting

I tried to make a callout to SAP webservice through Javascript Remoting and writing the response to the visualforce page DOM using the same javascript. Now, i have an issue that the amount field which ...
0
votes
1answer
44 views

Get rid of default formatting for outputText

I am trying to print out a sum of 2 Integer variables using outputText, however it appears with a different format than normal text. How can I get rid of this formatting? <apex:outputText value="{...
1
vote
1answer
125 views

Format custom textarea field for custom object

I have a custom object that has a custom field called Notes. The field has the Text Area datatype but when I use it in an outputText as such: <apex:outputText value="{!selectedDetail.Notes__c}"/&...
5
votes
1answer
3k views

Example of using String.format() with a number / does this function even work?

Per the docs format(String, List<String>) Treat the current string as a pattern that should be used for substitution in the same manner as apex:outputText. Which would lead me to ...
1
vote
1answer
495 views

How to convert number to time format (hh:mm:ss) in report?

I have a simple report and I would like to know how can I convert a number column into time format (hh:mm:ss)? I have a column (number) that is calculated in mins and I would like to show as time ...
5
votes
3answers
7k views

How to convert a number into a formatted string?

Note: there is an extensive discussion on converting a string into a decimal. This question asks how to convert a number into a formatted string. Given a decimal variable, how can I convert that ...
6
votes
1answer
895 views

outputField, long textarea field and unwanted spaces

I am having trouble with apex:outputField and a long textarea field. Salesforce appears to be inserting extra spaces on lines after BR tags after the page is rerendered following an actionFunction. ...
1
vote
0answers
58 views

Incorrect email textbox layout format

When sending an email from within a case (or other object records) in Salesforce, after accidentally pressing a specific key combination, I am now unable to use the full text box pane, instead I am ...
1
vote
2answers
218 views

Displaying more than 2 decimals for currency field in Report

I have a one currency field in an object, and I have kept 5 decimal places to that currency field. while showing the same field in a report it is showing only 2 decimal places. How can I change the ...
2
votes
2answers
531 views

Control custom field formatting on layout page

I've few custom fields on Account object, which user will drag on to the Account Layout page by customizing it. I'd like to control the formatting of these fields on the layout. For example one of ...
7
votes
1answer
1k views

How to use HTTPGet variable in URL (ExactTarget)?

Been trying to figure out a way to pass in the variable into a HTTPGet function for long time now. How to do it? Here's what I have so far, but it doesn't return anything. <p id="date" style="...
1
vote
1answer
406 views

Is there any way of using apex:actionRegion without ruining my design?

I'm trying to use rerender on a form. Quite simple in fact, besides the problem I've been unable to solve. Whenever I use apex:actionRegion, my form structure is ruined (for example, the fields ...
12
votes
2answers
13k views

How is a DateTime object formatted into a String suitable for a String based SOQL query?

In order to write a where clause against a datetime field, you need to format your dateTime object into the following format: WHERE SystemModstamp > 2005-10-08T01:02:03Z How do you correctly ...
0
votes
1answer
1k views

How to format a currency or decimal value without rounding?

We have a strange requirement where in we have to display a "Currency" field without decimals and without rounding off..i.e., we have to ignore decimals (eventhough decimal part is greater than .5) ...
1
vote
1answer
2k views

Date comparison issue

I am implementing date functionality where i want to get records date within last 4th calender quarter.How can i achieve this in SOQL? I have tried with date in LAST_4_QUARTERS, but am getting ...
22
votes
3answers
22k views

Visualforce Date formatting

I need this date format in a visualforce page: "December 14, 2013". I can't seem to find the format options for visualforce. I read that it's the same as the java messageformat class options, but I ...
2
votes
0answers
182 views

How do I avoid losing text and formatting when generating a document using conga composer?

I use conga composer to generate agreements. However, some of the formatting is lost in the process of generating the agreement from the template. There doesn't seem to be a pattern to the lost ...
1
vote
1answer
383 views

Formatting Chatter FeedItem (With Html?)

Is there any way to format a Chatter FeedItem. With html, or with apex methods? I want to be able to create a feedItem that looks like this Sample Chatter Post
10
votes
3answers
8k views

Format decimal in <apex:outputText> respecting the user's Locale

I'd like to format a decimal number in an <apex:outputText> respecting the user's locale: Using {0,number,####.###} should show a German user 10,234 and an American user 10.234 The ...