Questions tagged [if]

The tag has no usage guidance.

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
209 views

Visualforce conditional rendering formula not evaluating to True

It seems like my rendered If statement is not evaluating as expected (at least my expectations). Basically, I have 2 Id fields pulled from apex, and if they equal each other, it conditionally displays ...
1
vote
1answer
91 views

Using IsPickVal() function inside Email Templates

I tried using the following ISPICKVAL formula within an email template as shown: MQP Type is a pick list on the Task Object. I have run integration code(Python under AWS) which sets the pick list ...
0
votes
1answer
31 views

Formula field with 4 IF statements and 2 False statements

I need to make a formula field work, unfortunately, I cannot figure out how to place statements so that I can include 2 False options (False options have been bolded) The logic behind the formula: If ...
0
votes
0answers
13 views

Conditional Math Equation in Report

I have a Report that includes a calculation for "days overdue" of a Case (Due Date - Closed Date). SFDC is calling this field CDF1. I want to add a calculation for the average days overdue ...
0
votes
1answer
57 views

how to concatenate lookup fields given certain circumstances

I finished up this batch but came across an unforeseen scenario and can't seem to figure out how to code in the case it occurs. Here is my current code: global class Batch implements Database....
0
votes
0answers
23 views

Validation rule that requires fields to be filled out before change of Opp stage except for particular country

This is the Validation Rule I have created so far, what I need is to include - VAT field on the Account can't be blank except when the Account Country field says USA AND( NOT(ISBLANK( Account....
0
votes
0answers
19 views

NULL IF Statement is making a linebreak

I have a section on our Opportunity that creates a Text formula based on if a box in column A is ticked and the same box in column B is not. For example, if we request Item 1, we tick the first box, ...
0
votes
1answer
42 views

Empty String check not working

I am developing an Apex class which is making a webservice callout by supplying Account number as the request payload. If the Account is not found in the external system, the webservice is returning a ...
0
votes
1answer
55 views

Else if part getting skipped Salesforce Apex

I wrote this class with a method that sends an email from Sendgrid based on each template id. It works fine except, I have an if else statement which only runs the if and else part and not the else if....
0
votes
0answers
17 views

Formula IF with territory field / salesforce lightning

Good afternoon, I want to display "East", if territories are: New England Northeast Mid-Atlantic Southeast Midwest Hearthland I want to display "West", if territories aren't these ...
0
votes
0answers
24 views

Never left if condition

I've got a tricky question, my code doesn't work - suprise. I would like to return only a list of 'filtred' data but my code never leav a if condition. So when if condition return true and my script ...
0
votes
1answer
40 views

multiselect pick list custom field

I have a long if(includes formula that is aggregating a few common responses into the same text values. (It's longer than below but that is enough for my question). There are actually 3 outcomes I ...
0
votes
1answer
27 views

IF(CONTAINS) question from an MPL

I am trying to aggregate data from an MPL into a separate field with fewer values. When I run the formulas, it is only returning the first value. Is there a way to rewrite the formula so that all true ...
0
votes
0answers
57 views

If condition in HTML email template not working. Weird

I have a HTML email template with IF loop which is not working. {!IF(NOT(ISNULL(pba__Closing__c.Buildings_survey_booked_To__c)),' to '+pba__Closing__c.Buildings_survey_booked_To__c,' ')} There is ...
0
votes
0answers
401 views

Detecting Data Changes with Change Handlers

I am looking at this example in the Developer Guide, and I can't replicate this in my instance. What am I doing wrong? Here is a snippet. <!-- Lookup Attributes --> <aura:attribute name="...
0
votes
1answer
224 views

If Condition for onclick not working

I am looking for a way to insert a record and close the window with the VF-Page, when everything was entered correctly and user clicks button. The values are entered correctly, if a subject was ...
0
votes
1answer
76 views

ERROR deploying ApexPage Syntax error. Found 'IF'

I am trying to use IF on my VF page. But I am getting this error. What's wrong? <apex:inputText value="{!IF(CONTAINS(stringOfKeys, item.Id), orders[item.itemId], '')}" id="bVAL"/>
-1
votes
1answer
32 views

string.isempty doesn't appear to work when trying to retrieve price list Name

it appears my if statement with String.isEmpty doesn't seem to be working. What i want it to do is check if a price list entry doesn't exist it creates a new one, and if it does it updates that one. ...
-1
votes
1answer
29 views

Visualforce email template IF condition for Second Opportunity Owner field

I have an email alert that goes out when an Opportunity is changed to Closed Won and it says who the Opportunity Owner is. Sometimes, a second salesperson is involved in the deal, so I have a field ...