About formatting data on the view of Visualforce pages.

learn more… | top users | synonyms

1
vote
1answer
19 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 ...
0
votes
0answers
28 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 ...
1
vote
1answer
46 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
29 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
59 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
36 views

FormatNumer() 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
102 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
50 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
55 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
67 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
172 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
173 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
142 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
57 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
171 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
335 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
106 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
430 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
32 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
489 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
229 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
748 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
188 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
256 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
676 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
160 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
42 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 ...
1
vote
1answer
106 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 ...
4
votes
1answer
2k 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
391 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 ...
3
votes
1answer
5k 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
731 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
53 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
161 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
446 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
783 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" ...
1
vote
1answer
360 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 ...
9
votes
2answers
10k 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
963 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 ...
16
votes
3answers
16k 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
148 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
334 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
9
votes
3answers
6k 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 ...
2
votes
1answer
628 views

How to write a fixed width file in apex and download it as text file

I am trying a download file program which should be of the Fixed width Text file format. For example:- My object name is College and it has fields(length) namely ...
3
votes
1answer
7k views

Displaying date in visualforce force page in required format

I have a date fields which on displaying on VF page displays like 12/10/2012. But i want to display it like December 10, 2012. How can i do it? i am not getting the easy way.
1
vote
1answer
253 views

Is there a way to format dates inline in a VisualForce page?

In a .page file, I have the following: <li>Created on: {!proposal.CreatedDate}</li> which prints out something really ugly like Created on: Thu Aug 22 01:00:35 GMT 2013. Is there a way ...
1
vote
1answer
173 views

Determining number separator when inputHidden doesn't format a currency number

If I return an object with a currency field, and I'm returning it from a controller. If I use an <apex:inputField>, the number is correctly formatted as 1,234.56. However, if I use an ...
4
votes
2answers
3k views

Apex:outputText format currency without object value for apex:param value

I have a visualforce table where I'm creating a discount calculator. Basically user inputs a discount percentage and the table on the visualforce updates automatically to show you the updated price ...
5
votes
2answers
1k views

Tab (\t character) Substitute In Visualforce

I am having some difficulty trying to show a hierarchy within a PDF without some of the basic HTML formatting constructs. Below is an example of me trying to format the content using span tags. I ...