Skip to main content

Questions tagged [operators]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
36 views

LWC Addition Assignment Operator (+=) appending

I have a lWC that is summarizing a total. If I have a single row the Cost summary works but when a new row is added it fails because it adds a 0 to the front of the total and I am not sure why. Its ...
Phuc's user avatar
  • 373
0 votes
1 answer
45 views

ISO Case Validation Rule where Status = X, (A cannot be blank), and (either B or C cannot be blank)

I've tried several iterations of formulas, but can't get the last section to work. It is intended that the Validation would fire when trying to change to the specific status, if the criteria were met. ...
Christin Head's user avatar
1 vote
0 answers
834 views

Salesforce Flow - How to use In Operator with Data Table element selected Rows

I am using Flow element Data Table I have scenario like, two picklist values are added on the screen e.g. Status and Type of Object, and also the comment field. When the user clicks on next I will ...
herr's user avatar
  • 133
0 votes
2 answers
121 views

Ampscript condition else/if to show the default link and conditional issue

I have DE lists like this for "Fruits" category: "Apple", "Apple A", "Apple 2", "Apple red", "Apple green", "Apple CA", "...
Uss's user avatar
  • 7
0 votes
2 answers
358 views

Why delete operator doesn't work in LWC?

I have a property in my LWC component. I want to delete the value from it, so it becomes undefined. In usual JS, I can just execute an statement delete this.property It is executed successfully, but ...
Patlatus's user avatar
  • 17.8k
0 votes
1 answer
50 views

ELSEIF Statements not being evaluated

I am having issue with the script below. I have a DE that includes a column "Days Since Last Login". I want specific language to display based upon what the numeric value is in that column ...
KSee's user avatar
  • 1
-2 votes
1 answer
505 views

Multiple OR for one variable and with AND CONDITION [closed]

How to write this code If @br != 'X' OR 'Y' OR 'Z' AND @PROF=='N'
Seo's user avatar
  • 1
0 votes
2 answers
754 views

How to rewrite that ternary operator code to if-else?

I can't understand that part of the code - how to rewrite this to if-s and else? Especially the partthis.map1?.containsKey(custom_object__c?.workflow_status__c) List<custom_object_2__c> ...
Fgh999's user avatar
  • 35
-1 votes
2 answers
92 views

Need a validation rule for two different account types

I have two account types, Provider and Partner. My task is to forbid to create or change the record without entering a special code in a custom field. For Partner it should start from PRT, for ...
Yuliya Nesen's user avatar
0 votes
1 answer
510 views

How to use caret in Apex?

If I use the caret symbol to represent "power of" in Decimal-based mathematical expressions it throws me an error. ^ operator can only be applied to Boolean expressions or to Integer or Long ...
New Learner's user avatar
4 votes
1 answer
462 views

Minified code in LWC is wrong because of optional chaining operator

I have a LWC that has a simple getter function that controls whether to display an element or not: get _isGridNotEmpty(){ return this._gridData?.length > 0; } However I found that the element ...
unhinged's user avatar
  • 354
8 votes
2 answers
2k views

Using <> vs. !=

Is there any difference between using <> and != for checking if two native objects are not equal to each other in Apex? i.e. String, Date etc. I have only ever used != which has never failed me ...
Tom Ansley's user avatar
1 vote
3 answers
310 views

Formula is too big to execute (5,221 characters). Maximum size is 5,000 characters [closed]

Below is my formula that I want to execute I tried using '&& and ||' instead but I am still getting error Can you please help IF( AND( $RecordType.Name = "Reseller", ...
nisha rao's user avatar
1 vote
1 answer
922 views

How to formulate IF value_if_false to leave field as is

I have a field that is formulated to give me a day-count since a project has been created called "Study Age", written as such: IF( ISPICKVAL( Status__c , "Active"), TODAY () - ...
Kari's user avatar
  • 11
9 votes
2 answers
4k views

Ternary Operator Compile Failure. Incompatible types in ternary operator

Assume we have some code in Apex: APEX Boolean isString = true; // or false List<String> labels = new List<String>{ 'Label' }; Object entity = isString ? labels.get(0) : ...
Oleh Berehovskyi's user avatar
0 votes
1 answer
388 views

Assignment Operation in Apex

I'm going through a code implemented by one of our vendors and come across below assignment operation, serialNumberObj.Prefunded__c = snWrap.Prefunded == 'ZEW'; Here, Prefunded__c is a boolean field ...
Sudh's user avatar
  • 33
0 votes
2 answers
1k views

Not equal to comparison operator does not work

I have a list of opportunities that I fetched via SOQL query. I am trying to check if any of the fetched opportunities is 'Closed Lost' or 'Closed - Lost'or 'Completed' or 'Closed Won'. If not, then I ...
Student's user avatar
  • 565
1 vote
1 answer
93 views

Assigning operators for Date fields and comparing with today(), Scheduled Apex Code

Exam_Date__c = 01/01/2018, Expiration_Date__c = 01/31/2018 (usually 30 days gap) I want to send an email 7 days prior to expiration, on say eg. 01/25/2018, likewise. I used the following formula in ...
Niveth Kumar's user avatar
5 votes
1 answer
465 views

Docs about comparison operators saying case-sensitive

Above all sorry about the title, couldn't find a good one. Please edit if you think of any I stumbled upon this description about equals operator in Salesforce docs. OPERATOR NAME DESCRIPTION ...
Lafexlos's user avatar
  • 519
0 votes
1 answer
75 views

Ternary Operator error - Error: Compile Error: expecting a colon, found ')' at line

(!GWB_Utility.isNull(cust.FinancialIndicator)?cust.FinancialIndicator == 'Y'? 'Yes':cust.FinancialIndicator == 'N'? 'No':null); Idea - the value will be either Y/N/Null - If it's Y show Yes , N show ...
Dexter D's user avatar
  • 173
1 vote
1 answer
46 views

Best way to implement a formula

I have a scenerio which is based on a field of a record. This field is a lookup relation ship to another record. Example on my abc__c object I have lookup to xyz__c object. The xyz__c object has a ...
SfdcBat's user avatar
  • 4,839
2 votes
2 answers
9k views

comparing and assign values to a variable on same line

I saw this kind of logic somewhere in an apex code and got curious about how this can be done. The code is a one liner and does variable check and assignment in the same line. It uses the <> ...
SfdcBat's user avatar
  • 4,839
3 votes
3 answers
1k views

Operator Precedence in formula field

I have formula field like this: 2*2^3 Result = 64 Expected Result = 16 - I am getting this result in excel I corrected the formula by adding parenthesis. My question is that exponentiation ...
abdn's user avatar
  • 535
4 votes
1 answer
3k views

How do the "includes" and "excludes" operators work in Workflow rule criteria?

Does anybody know how the "includes" and "excludes" operators work when setting up rule criteria for workflow rules? The only documentation I've found on this is located at https://help.salesforce....
Robert Watson's user avatar
0 votes
1 answer
31 views

how to evaluate expression to truewhen both the operands are false

<div id="contentToToggle" style="display:{!if(showContent && showContentreplica,"block","none")};"> dont have duplicates </div> { showContent =false; showContentreplica = ...
Satya's user avatar
  • 754
3 votes
2 answers
14k views

Is this ternary operator logic documented?

Ever since... well, the dawn of Apex Code, I've always presumed that the ternary operator evaluated both the true and false branches as part of its operation. Today, while playing around with them, I ...
sfdcfox's user avatar
  • 502k
2 votes
1 answer
1k views

Like Operator in a Trigger

I am editing an existing Trigger where I need to reference a field that starts with 'Check In @' So I tried using the LIKE operator but it gives an error: ((t.Subject=='Store Check-In' || t.Subject ...
Phuc's user avatar
  • 373
1 vote
0 answers
31 views

Liveagent: Getting the details was not successful

I have two Operators in my LiveAgent. When Operator 2 is on line and Operator 1 is offline all works fine: the calls arrrives to the Operator 2 and the Transcript and another custome object are saved....
Andrea Ianni's user avatar
  • 1,161
1 vote
1 answer
112 views

Render condition error throws

I have below render condition that throws error. Can someone let me the correct condition? Please counter is a get set Integer value in controller that increments after a check in for loop inside ...
Testing_SFDC's user avatar
  • 2,968
8 votes
2 answers
4k views

Is Changed operator in Process Builder

I am checking whether Order OwnerId is changed or not in Process buider.If Changed update related records. But getting below error when Order.Close_Date__c is updated through Workflow field update ...
sfdc's user avatar
  • 13.8k
4 votes
1 answer
369 views

exact equality operator

Found this in a great post on salesforce collections (http://peterknolle.com/collections-eggstravaganza/). Can anyone explain what is going on here that this isn't true? Account acct = [ ...
Phil B's user avatar
  • 5,046
8 votes
1 answer
860 views

Comparing to null with "<>"

I was reviewing some Apex code when I found an expression like this: if (a <> null && b != null) { ... } My gut feeling tells me that <> is an alternative way to say "not ...
user avatar
2 votes
1 answer
567 views

Getting the comma out of YEAR function in salesforce formula builder?

I have a YEAR(CloseDate) which required to be a number field type. And when I try to convert it to text to get rid of the 2,014 comma with something like this... TEXT(YEAR(CloseDate)) or this... YEAR(...
Miklr's user avatar
  • 653
4 votes
1 answer
3k views

special characters not displaying properly

Special characters such as ≠ or ≥ are displaying as question marks on a single customer's site. My app is a managed package and these characters appear correctly on all other instances, so I figure ...
Dex's user avatar
  • 41
2 votes
4 answers
152 views

Approval process with AND( OR() ) doesn't seem require all

I thought that should be able to wrap a bunch OR conditions with an AND that would require TRUE from each OR such as this. AND(OR(ISPICKVAL(Apttus_Proposal__Opportunity__r.Sales_Typ__c, "New"), ...
Miklr's user avatar
  • 653