Skip to main content
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [expressions]

An expression in a programming language is a combination of one or more explicit values, constants, variables, operators, and functions that the programming language interprets (according to its particular rules of precedence and of association) and computes to produce ("to return", in a stateful environment) another value. This process, as for mathematical expressions, is called evaluation.

Filter by
Sorted by
Tagged with
3 votes
1 answer

LWC optional chaining "array?.length' in expression causes output of "[object Object]"

Context: In my LWC, I have an array that may not be defined, and I want to check its length. So I use the optional chaining arr?.length to not error if the array is undefined. I also want to default ...
Andy Ray's user avatar
  • 1,468
1 vote
1 answer

How to modify a wired result in a getter?

I have a wired function in an LWC that populates an array (records) on success returning an address for each array value. @wire(searchSomething, { searchSomething: '$searchObject'}) wiredContacts(...
kratos's user avatar
  • 541
0 votes
1 answer

I'm trying to avoid or at least organize better expressions inside if statement in my code

Need help, my code has a lot of expressions in if statement and I'm trying to get rid of it or organize it in a better way. for example like this: if (fieldNumber==1 && (language=='en' || ...
Jen P's user avatar
  • 1
5 votes
4 answers

Conditional rendering based on key in for:each

I'm stuck on how to conditionally render (let alone apply styles) while in a for:each according to an expression. <lightning-layout-item padding="around-small"> <div class="header-column"...
Andrew's user avatar
  • 51
0 votes
1 answer

How to write Expressions in SOQL Query

I have a custom object Professor Professor { Name(Text) , Salary(Number) , Bonus(Number)} I wrote the query in Developer console select Name from Professor__c where (salary__c + bonus__c) > 7 ...
Dinesh Kumar's user avatar
0 votes
1 answer

Logical operators in Apex

How do I combine OR's and AND? The below gives me an error. Any pointers are helpful. Thanks // check changed values if ((old.value = '2' || old.value = '3') && (new.value = '0' || new....
Spiderman's user avatar
40 votes
5 answers

Expression Functions for Lightning Web Components

How can expression functions similar to Visualforce and Lightning Aura Components be achieved within lightning web components? For example, <template if:true={index % 5 == 0}><br></...
Oleh Berehovskyi's user avatar
0 votes
1 answer

I am trying to write an advanced expression which executes when a value in the field equals to Day of that month

I have this field named Billing Date it is a number field where you enter just only the day number and I want it to run every month on that date. So something like: IF(!(ISBLANK(BILLINGDATE)), ...
user avatar
3 votes
1 answer

Comparing two attributes in one expression

I am experiencing something strange, but I suspect I am doing something wrong I have two string aura:attributes. When I try to compare them, the comparison doesn't work. Here is an example Component ...
Sebastian Kessel's user avatar
0 votes
2 answers

verify schedule job expression

The scheduled job run everyday at 12 am. String schExp = '0 0 0 * * ?'; Is it correct?
Shilpa's user avatar
  • 687
1 vote
1 answer

What conditional syntax does aura/lightning support?

Does lightning only support conditional functions provided in this document? Or can I use javscript conditional format? Example: <aura:if isTrue="{!or(!v.displayTodayOnly, and(lessthanorequal(v....
TemporaryFix's user avatar
  • 2,946
1 vote
1 answer

Is it performance improvement to use unbound expression in array iteration?

Assuming elements in list may be added or removed but element properties stay the same, is it performance improvement to use {#...} instead {!...} ? In below example, it is decided that title prop is ...
wojciech.slodziak's user avatar
1 vote
1 answer

How to use Split() function inside an Expression in lightning component

I would like to use Split function inside my expression in salesforce lightning. I'm passing a map from my class and receiving the same in js controller and then converting it to List attribute for ...
AjaySFDC's user avatar
  • 618
7 votes
1 answer

Access Array attribute via Integer attribute in Lightning

I have a component... <aura:component> <aura:attribute name="myArray" type="Object" /> <aura:attribute name="index" type="Integer" default="0" /> ... {!v.myArray[v....
Robert Sösemann's user avatar
17 votes
4 answers

Getting the URL parameter into Lightning component using the "{! paramName}" expression

I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for ...
Tarique Shamim's user avatar
0 votes
1 answer

Expression Builder blockSubmit Form

I am developing a script to block submition of ASI Table variable of a date, but even when the blocking is in the condition and the condtion is not engaged it still gets executed. var totalRowCount = ...
Ruslan Batura's user avatar
6 votes
1 answer

Expression cannot be a statement Error

I want to create a batch job to compare a date and then update a related object. I want to have a short-hand ternary expression as I will have about 60 similar lines depending on the month. I have ...
Dan Wooding's user avatar
  • 3,578
7 votes
2 answers

simple expression evaluation for extended lightning component is sometimes wrong

In this simple and straightforward scenario the evaluation of an expression is not getting updated correctly. I have two components, an (abstract) base component and an extended one: cmBaseComponent:...
Christian Menzinger's user avatar
0 votes
1 answer

How to use Custom Labels inside of an expression on a custom button?

So I'll try to keep this short and simple. I have a client who wants to use Custom Labels in their buttons so the average user can duplicate and re-use them. One such label is simply the API name of ...
Monty Killough's user avatar
5 votes
2 answers

Lightning Components: expression inside <ltng:require /> fails

I have the following markup in a Component <aura:component controller="elfL1" implements="forceCommunity:availableForAllPageTypes,force:appHostable"> <aura:handler name="init" value="{!...
Uwe Heim's user avatar
  • 28.4k