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
0
votes
1answer
34 views

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 ...
0
votes
1answer
32 views

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....
27
votes
3answers
8k views

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></...
0
votes
1answer
41 views

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)), ...
2
votes
1answer
2k views

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 ...
0
votes
2answers
25 views

verify schedule job expression

The scheduled job run everyday at 12 am. String schExp = '0 0 0 * * ?'; Is it correct?
1
vote
1answer
156 views

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....
1
vote
1answer
162 views

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 ...
1
vote
1answer
4k views

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 ...
4
votes
1answer
4k views

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....
15
votes
4answers
37k views

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 ...
0
votes
1answer
51 views

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 = ...
5
votes
1answer
3k views

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 ...
7
votes
2answers
113 views

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:...
0
votes
1answer
260 views

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 ...
7
votes
2answers
1k views

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="{!...