Questions tagged [number]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
0answers
106 views

How to prevent salesforce from auto- formatting phone numbers

I am using a lightning component to display a phone number. I am currently in France and i want all the phone numbers to follow local formatting, which is not the case when i use the lightning ...
3
votes
1answer
56 views

How to turn datetime into year formula without the dot

I am using the following formula to get the year: YEAR(DATEVALUE( ActivatedDate )) But this ends up whith the following 2.018 instead of 2018. How do I remove the . from 2.018?
0
votes
1answer
83 views

Is it possible to convert numbers from Base 10 to Base Alphabet and back again using formula fields?

For shits and giggles, I am working to create a spreadsheet application (comparable to Excel, inspired by The SCells Spreadsheet) on Salesforce.com Each spreadsheet cell will correspond to one ...
1
vote
1answer
3k views

Best way of generating a random number

In order to get fake IDs for testing needs I wrote something that works and is reusable, but I'd like to know if there is better ways because my code seems heavy. n is the total caracters of the ...
1
vote
1answer
3k views

Lightning:datatable number formatting

I have created a lightning:datatable to display order lines. The order lines are fetched via a REST call. I parse the JSON response and add to the datatable data attribute. Everything works fine but ...
0
votes
3answers
661 views

How to restrict Number fields in Validation rule

I have Custom Object called "Review", with the formula field as (Culture_fit__c + Experience__c + Leadership_Skills__c + IF( Recommend_For_hire__c, 5, 1 ) ) /4. with Number ...
1
vote
2answers
147 views

Formula Help - Multiplying using Number and Text fields

I need to alter this formula to include a text field (The text field displays a number) IF((ISPICKVAL(Louvre_Calculator__c, "215mm Louvre Calculator")), (Pivot_mm__c - 4)-(**2*60**), (Pivot_mm__c - ...
0
votes
1answer
41 views

Custom Formula Field that uses a Text Field but needs to be compared to Greater than or less than signs?

I have a custom field that is a text field, Height__c (It was set as a text field from the start, not sure why) Height__c needs to be compared to a couple of statements: If height__c is >10" call ...
1
vote
1answer
39 views

Export all contacts having Numeric last name?

I have a issue where in our Org, last name of many contacts has been changed to Numeric. I need to take an extract of all those contacts having number in their last name along with their ID. I ...
3
votes
1answer
1k views

How to add string values using apex?

I have two string values using numbers. How to add(not concatenate) the two string values. Could you please help me. my code: string num='2016'; system.debug('first:'+num); Output: 2016 string num1=...
1
vote
1answer
609 views

Convert double to String

I have the following double from salesforce as a number = Latitude = 50.916408140415314 I want to convert it to a string. However when I convert it to a string like this: string.valueof(latitude) i ...
4
votes
1answer
912 views

ui:inputDate how to show month number and not month string

My problem is that I'm not able to get the date with a month number format. This is my code: <ui:inputDate aura:id="input" value="2018-01-01" format="dd-MM-yyyy" ...
4
votes
1answer
66 views

In a Salesforce Number field, how much performance impact does its length have?

Does a 2,2 field perform noticeably better than a 16,2 if the same value (e.g. 24.45) is stored in the context of Apex DML Formulas whatever I forgot, please add To clarify: This question ...
0
votes
2answers
230 views

Conversion Integer to Roman Numeral

i want to convert integer to roman numeral. As we know, format for roman numeral is like this: 1 = I 5 = V 10 = X 50 = L 100 = C 500 = D 1000 = M For example, if we have number 497, it will be ...
1
vote
2answers
104 views

Convert a number picklist to date field & send email on that date before

I have a picklist with values from 1 to 31.It corresponds to the date. My requirement is to convert this number selected to a date. Lets say the number selected is 20 then it has to correspond to 20th ...
1
vote
1answer
2k views

Format decimal number with thousand separator with a dot (.)

I would like to format a visualforce variable '{!TotalE}' with a thousand separator as . notation for example 123386258.00 becomes 123.386.258 I have tried examples of outputtext 'value="{0, ...
6
votes
3answers
7k views

How to check if String is Decimal?

Seems like String.IsNumeric() returns TRUE if it's integer. String numString = '12'; System.Debug(numString.IsNumeric()); If it's a decimal (eg. 12.2) this is returning FALSE. I believe it should ...
0
votes
0answers
30 views

auto number which is text

I have to create a field on opportunity which will be lookup to a custom object. On custom object, there is a Quote Number (Text) which is a standard field, I have to fetch that quote number to a ...
1
vote
1answer
148 views

parser to convert values including fraction to decimal

I have one Fields planValue_c set as %age in salesforce. Possible inputs when reading from file are like 20 -Integer 20 2/3- Integer with fraction ( space is delimiter) 2/3 - Fraction Assuming ...
0
votes
1answer
271 views

Number to word logic

My code to convert number to words is as below. Here i am getting output properly but if i have number 5,07,920 it is showing result five hundered and seven thousand nine hundred and twenty. i want ...
2
votes
1answer
1k views

Number Type, Decimal Points Confusion

We have a number typed field say Min_Distance__c where we have defined, Length=1 and Decimal places=2. But we experienced that salesforce allows to save numbers with more than 2 decimal places. In ...
0
votes
1answer
54 views

Can't insert a record with Number(16, 2) field type

I've to insert, for my test method, an Invoice__c object with a value of Amount_Due__c more than 0. This field is a Formula (Number) with 2 Decimal Places field with this syntax Invoice_Amount__c - ...
1
vote
1answer
229 views

How to create a data extension with everyone who has ever opened or clicked on an email?

I'm trying to create a data extension with everyone who has ever opened or clicked on an email in it... The challenge is, that we used to have a SFDC + ExactTarget integration prior to migrating to ...
1
vote
1answer
1k views

Use Less than and greater than workflow criteria with text field

I have an issue. A custom text field is created to store survey score number. Now I have to setup a flow rule when score is less than 5. A case should be created and assign to account owner. My ...
0
votes
1answer
126 views

Why do you have to add “.0” to a SOQL where clause if the number is greater than 2^31? [duplicate]

Given a number field on Case, try to execute these SOQL queries: SELECT Id FROM Case where NumberField__c = 2147483647 => works fine SELECT Id FROM Case where NumberField__c = 2147483648 => fails ...
7
votes
2answers
4k views

Number Field - Limit Four Characters - Validation Rules

I'm having trouble enforcing a minimum character requirement on a Salesforce number field (using Validation Rules). I can get the limitation to work on a text field using: AND( ISBLANK(...
3
votes
3answers
1k views

Apex - format number with more than 3 digits after decimal point

According to SF documentation Decimal.format() method "Returns the String value of this Decimal using the locale of the context user.", but it leaves only 3 digits after decimal point. It doesn't even ...
1
vote
1answer
45 views

Why does SalesForce aggregate query discards two last digits?

I have created a simple object called Object__c. Also Number field (18,0) I have created for this object called Number__c. Then I have created one record with name 'x' and Number__c value of '111 111 ...
7
votes
1answer
1k views

How to make numeric inputs Lightning Components respect corret L10N decimal delimiter?

Assume there is a Field aaaNumber__c on Account defined as Number(12,2) Now I use it like this <aura:component controller="elfL1" implements="forceCommunity:availableForAllPageTypes,force:...
0
votes
1answer
52 views

How to create a formula to output a number for a picklist value, and reject an N/A value?

In creating a formula to stamp the numerical value of a picklist, I am having difficulty with an "N/A" value. Right now, the picklist has 0,1,2,3,4,5,6,7,8,9,10,N/A as options to choose from. I am ...
0
votes
1answer
134 views

Conditional highlighting rules

I would like to highlight fields with amount 0 with red colour. And all the others to be without colour. For some reason I'm getting all the fields red when I set conditional highlighting as on the ...
0
votes
0answers
464 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 ...
0
votes
3answers
2k views

Set a max value for a custom field in salesforce of type number

I have created a custom field in a custom object of type Number(2,1) in salesforce. Please let me know how set a max value for this field.
4
votes
1answer
3k views

outputText number formating with space a thousand separator

How do I format a number in an outputText element so that it uses spaces as a separator between thousands? What I currently have is an outputText element which formats number using comma as a ...
0
votes
0answers
2k views

How to convert number field to text in formula field?

I created a number field with options, Required, Unique and External Id checked, and want to use formula to convert Employee Number to text to prevent commas from displaying in the field. I tried to ...
1
vote
1answer
212 views

Convert number to fax format. [duplicate]

I want to display the number in fax format. If the user enter the number as 12345678910 it need to be formated as (1234)(567)(8910) can it be possible through formula field without writing trigger. If ...