New answers tagged

0

Stealing from this answer. Validation rules aren't really meant to do what you're looking to do. Preventing certain fields from being edited is easy. The inverse of that, allowing certain fields to be edited, is hard In the end, the only way to achieve what you want in a validation rule is to check that no other fields, besides the 3 you allow to be edited,...


4

Notice how all the other field paths begin with [Case].. You need to do the same with StageName, changing it to [Case].StageName. However, the Case object in fact does not have this field. If you had for example a custom Opportunity__c lookup you'd do [Case].Opportunity__r.StageName. Alternatively, if you wanted to filter on something like Status you would ...


1

Profile Ids change when they're deployed to other orgs, so I'd argue for using $Profile.Name instead of $Profile.Id That aside, a few points: Formula fields cannot set the value of other fields You didn't specify where this formula was being used so, just to cover all the bases, if you're trying to make this a formula field, that is not the correct approach. ...


5

$ is used for Global Variables. These are used in all kinds of formulas, including formula fields, validation rules, Process Builder, etc. They are used exactly as you would any other kind of variable, they just have special meaning in context (e.g. referencing the user's profile via $Profile).


-3

In Validation Rules, Symbol "$" is used to identify the current record and user (whom create/update that record) field values. On your question, $Recordtype.Name points to current record's record type. $Profile.Name points current user's profile whom try to create/update that record. You can refer this kind things in here Please let me know if it ...


0

The issue was about not grouping the first two conditions. This way it worked for me. If((TEXT(Test.Cold.Type__c) = '' || ISPICKVAL(Sale__r.Test__c, 'Sold')) && TEXT(Test.Cold.Type_Set__c) = ''),0,1)


1

There was one extra ). Because of this it is not working. You remove it and update the formula as below. IF(OR( ISBLANK( TEXT(Test.Cold.Type__c) ),ISPICKVAL(Sale__r.Test__c, 'Sold') ,ISBLANK( TEXT(Test.Cold.Type_Set__c)) ),0,1)


4

You in fact have an extra parenthesis. As is often the case, syntax errors in your code may lead to error messages that don't quite make sense, because your code cannot actually be parsed. If( TEXT(Test.Cold.Type__c) = '' || ISPICKVAL(Sale__r.Test__c, 'Sold') || TEXT(Test.Cold.Type_Set__c) = '' ),0,1) <== Here's the problem - that first ...


0

This is as simple as: IF(CONTAINS($Label.MYLABEL, Account.BillingState), 0, Amount) Replace fields and values as necessary.


0

You need to substract 12 if the hour is greater than 12, it means that you need an IF like this: IF (HOUR(Shift_App_Profile__r.Sunday_Preferred_Start__c) < 12, HOUR(Shift_App_Profile__r.Sunday_Preferred_Start__c), HOUR(Shift_App_Profile__r.Sunday_Preferred_Start__c) - 12) in each place you show the hour


0

I think you just wrote it in wrong order . So it should be : IF(CONTAINS([npe5__Affiliation__c].npe5__Contact__r.Description,[npe5__Affiliation__c].npe5__Organization__r.Name),[npe5__Affiliation__c].npe5__Contact__r.Description,([npe5__Affiliation__c].npe5__Contact__r.Description & " " & [npe5__Affiliation__c].npe5__Organization__r.Name))


1

A Flow or Apex Trigger is what you need here. Formulas can't refer to child objects or query child objects. If you need it only for UI purposes, though, you could write a component or Visualforce page to display the value on the page layout, or use a Report.


0

Try this: ROUND(Value * 2)/2 Example: We want 5.3 to become 5.5 5.3 * 2 ==> 10.6 Round(10.6) ==> 11 11/2 ==> 5.5 Floor and Ceiling also work with this method. We can even make work with 0.25 values. We just multiply by 4. Example: make 5.3 as 5.25 5.3 * 4 ==> 21.2 Round(21.2) ==> 21 21/4 ==> 5.25


3

I tried some simple tests in a sandbox. I created a simple Flow: I made my Currency Flow Formula just be the value of a currency field on the object: Then I set up my screen element like yours: When the field on the object had a value - even zero - the Flow ran & the value showed in the screen element. When the field on the object had no value, the ...


0

Never mind, I fixed it: I mixed up the LEFT & RIGHT functions by taking 3 values from the right, and >=6, when it should have been <=6, which gave me "-22" >= "21" resulting in the wrong false/true evaluation. When it should have been if Fiscal Year = 21-22, then take "22" out of the picklist value to compare to ...


0

I wasn't sure if I needed the OR/AND and I don't. I modified the CheckboxCombine formula and this works! I was overcomplicating from my Excel days...a Plus sign is all that is needed! IF({!checkboxAA},'AA, ','') + IF({!checkboxAT_ATH},'AT_ATH, ','') + IF({!checkboxDE},'DE, ','') I get a returned string of AA,AT_ATH,DE when all 3 are selected and individual ...


2

It cannot be done with formula. You could use something like Contains(asdf__c, '\n'), but line breaks are saved only in long text area fields and those cannot be referenced in formula. Simple text field will remove all line breaks.


0

You definitely don't want to use AND or OR to try and come up with every possible combination. That would require you to write a total of 229 (536,870,912) possible combinations into your formula. However, you can use IF with string concatenation (&): IF({!checkboxAA}, 'AA,', '') & IF({!checkboxAT_ATH}, 'AT,', '') & ... and so on ... Or, you ...


Top 50 recent answers are included