Questions tagged [aura-if]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
66 views

Hide custom picklist field dependent on other picklist value in Aura?

I am trying to hide picklist value field on aura component page. There is one picklist field called Registraction__c with Yes/No values. I am trying to control another field based on the values ...
user136950's user avatar
0 votes
0 answers
17 views

Aura Theme Background Image By Profile [duplicate]

I am trying to add functionality to an Aura Theme component for an Experience Site where the User see's a different Background based on their Profile. I can get the page to show up properly, but am ...
taco20's user avatar
  • 1
1 vote
1 answer
172 views

Aura if else condition not working properly. Still enters the block even if condition is not met

I have this code that must call a child component based on the profile of the user. If 'isProfileA' attribute is true, it must call 'componentA', otherwise call 'componentB'. In my case, 'isProfileA' ...
Mareux's user avatar
  • 11
1 vote
1 answer
197 views

Show spinner for specific table row only?

I got a table with an account list, as such: <table> <aura:iteration items="{!v.accounts}" var="acc"> <tr> <td> <...
erikvm's user avatar
  • 721
0 votes
1 answer
828 views

How do do check if a list in my aura component is empty

I have created a list of child contacts of an account and I am looking to have an aura:if statement for if the list is empty or not. I have used the line <aura:if isTrue="isEmpty(v.ContactList)...
RuliaOtter's user avatar
0 votes
0 answers
366 views

How to access the field value dynamically in the expression Aura Component

I want to access the selected pick-list value to get the current record value dynamically but I don't know how to make that possible in AURA below I am giving the sample code please review it. <...
Anil Chaudhary's user avatar
0 votes
1 answer
367 views

Initially default selected value returns null during button click in aura component

I made Temp Reservation as default selected option. Initially when i click save button it returns null instead of Temp Reservation. once i change the option it returns the selected value. Anyone helps ...
Kothandaraman Nangainathan's user avatar
0 votes
1 answer
431 views

How can I hide a lightning:input using aura:if?

I'm building a component and I would like a field to appear only if it has not been filled in. It's working fine to hide when the field isn't empty, but when I need to fill it using my component ...
Sabrina T.'s user avatar
1 vote
1 answer
950 views

comparing two attribute value in component

I have loop in which i want to compare rec.id with arrtribute SummaryId1 which is integer.when i use == operator like that <aura:if isTrue="{!v.summaryId1 == !recc.id}"> then ...
user avatar
0 votes
1 answer
389 views

Component.find() not working within if block

I'm trying to change the selectedTabId of a tab item in aura and the component.find() is returning null, I think it has something to do with the tabs being within an aura:if block but i'm not sure. ...
Brendan Kelly's user avatar
0 votes
1 answer
4k views

aura:if displays false condition by default

I have a combobox where user selects LWC or Aura as component type and a boolean variable islwc which I am setting when user clicks submit button In cmp, <aura:attribute name="islwc" ...
Shreya Pandita's user avatar
0 votes
0 answers
804 views

aura:if prevents 'onload' of lightning recordEditform to be called

I create a Lightning component which loads an Opportunity record with recordEditForm. In this component, I want to display areas conditionnally. I am using aura:if/aura:set tags sequence for that. The ...
fredbe's user avatar
  • 135
0 votes
1 answer
50 views

If conditions while passing paramters to child component in aura

I am trying to pass a value from parent to child component in the following manner <c:contactSelect accountId="{!IF(v.proposal.CurrencyIsoCode != 'US' && v.proposal.BillingCountry__c !=...
Madhurima's user avatar
  • 1,265
0 votes
0 answers
772 views

Preselect Rows In Lightning Datatable (Aura lightning Component)

I am developing an aura lightning component which is "called" through a visualforce page. The functionality consists of two aura lightning components: Parent aura lightning component: ...
Xrhstos Kolonis's user avatar
0 votes
0 answers
99 views

How do I open a new form and query the database at the same time?

On the current page, I have a "New" button that opens a new form, where I need to fill in the "Account" field as well. And I want to get a list of "Account" values ​​in ...
unique user's user avatar
0 votes
0 answers
184 views

Aura:If results in label - field not value

When using aura:if, I can't get the value of the field to show. Unless I'm using lighting:outputfield the result is the field label. Is there something else I should do to ensure the value is produced ...
Harley's user avatar
  • 393
0 votes
2 answers
611 views

aura:if visibility issue with force:inputField

I am having a problem with aura:if tag. As when my condition is false, my field will be invisible. The Problem is when my condition again went true from false then only Label of my inputfield is ...
SF Dev's user avatar
  • 89
0 votes
0 answers
16 views

I need help with this Aura of statement. How to write an if statement if field one cannot be equal or greater than field two? [duplicate]

I need help with my Aura if statement.There are two time fields that the Start time can not be equal to or greater than the end time? I tried to write out the aura if statement but I am getting stuck ...
mia's user avatar
  • 21
2 votes
1 answer
19k views

How to write an if else statement in Aura

I tried to write out the aura if statement but I am getting stuck if someone can explain it to me in detail. thank you <aura:if isTrue="{!lessthan(v.Tl.time, v.Tl.End_Date_Time1__c)}">...
mia's user avatar
  • 21
0 votes
1 answer
3k views

How to call javascript controller method when a condition is met in lightning component?

I want to call a javascript controller method from the lightning component when a condition is met. This is the code I used: <aura:if isTrue="{!product.stripePlanId == v.chosenProduct}"> &...
Jayesh Babu's user avatar
0 votes
1 answer
521 views

I get empty spaces where the components should been located

code <aura:component controller="ProductController" implements="force:appHostable,flexipage:availableForAllPageTypes" access="global"> <aura:attribute name="soqlRequest" type="String" ...
Noker's user avatar
  • 57
1 vote
1 answer
624 views

<aura:if not working but <aura:renderif does - any reason why that you guys can see?

so the scenario is that i have an iteration within an iteration .... <aura:handler name="init" value="{!this}" action="{!c.setUpScreen}" /> <aura:attribute name="PageQuestions" type=...
Phil Macleod's user avatar
0 votes
1 answer
2k views

Use variable from lightning:recordEditForm in aura:if

I would like to know if it's possible to evaluate the expression from the RecordEditForm. This component's "else" is never hit. Are aura if tags supported within RecordEditForms? ...
user69530's user avatar
0 votes
1 answer
153 views

Aura isTrue not behaving as expected

I am getting a behavior in a component not behaving as expected. The Apex and Controller are returning exactly as they should be. When the word Green is passed isGreen should be true and isRed should ...
JP Blonshine's user avatar
2 votes
2 answers
466 views

Dynamically creating components vs Using Aura:if

Could someone please enlighten me on the pros and cons and use-cases of creating components dynamically from JavaScript as compared to using Aura:if in the markup to render components? I am not quite ...
user73893's user avatar
  • 305
3 votes
1 answer
836 views

display the contents of aura:if from another component

I'm trying to show (or unshow) the contents of aura:if by changing the isTrue value from another component. The value of isTrue is changed but the contents cannot be displayed.. Anyone knows how to ...
Shinya's user avatar
  • 437
0 votes
2 answers
72 views

Selection is not working for third selection

I write following component code : <aura:component controller="TransactionsalSecurity" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:...
psalesforce1989's user avatar
0 votes
1 answer
625 views

ui input radio button is not working

Hello all i am working on one requirement where i want to display table on the basis of my ui radio button selection but here once i select the radio button options then iam able to display the table ...
psalesforce1989's user avatar
0 votes
1 answer
299 views

Ui input radio not working as expected

Their is a requirement for creating two ui input radio buttons although i achieve that but here iam facing a unique problem the input radio is not deselected on the selection of second one both ...
psalesforce1989's user avatar
0 votes
0 answers
48 views

<aura if> not working as expected

Hello I made a following component which displays all permission set which i want but now I am stuck. Here I want to display my selected permission set on the table. Although the table is displayed on ...
psalesforce1989's user avatar
0 votes
1 answer
439 views

Hide text using aura:if

I'm trying to troubleshoot here for a day. My end goal here is to hide the Test text, depending on the Product_Family__c value. Here is the code, please let me know what am I missing. Apex public ...
Naofumi Kun's user avatar
0 votes
2 answers
882 views

Aura iteration is not holding on particular selection value resetting to first value every time loop is started

<lightning:select label="Permissionset Names" onchange="{!c.doInit}" > <option>None</option> <aura:iteration items="{!v.set}" var ="d"> <option>{!d....
psalesforce1989's user avatar
0 votes
1 answer
778 views

<aura if is true> not working as expected

I wrote a following code for component but it is not giving result as i expected, Component code <aura:component > <aura:attribute name="parentOptions" type="List"/> <aura:...
psalesforce1989's user avatar
1 vote
0 answers
40 views

Lightning auraif render issue

I am having a complex application where I have 10 child component in a master component that is inside an application. I am passing complex type from master component to all the 10 components. This ...
user614946's user avatar
2 votes
3 answers
3k views

two with AND (&&) conditions in auraif

I have an auraif when I tried to use the condition And (&&) it points error: <aura:if isTrue="{!v.value == 'test' && v.recTypeName == 'testing'}"> </aura:if>
Barbilque's user avatar
0 votes
1 answer
2k views

Aura:if condition needs to be added in lightning select option [closed]

i am new to lightning and i need to add a aura:if condition to one of lightning select option. My lightning select option contains a none value along with other options that render data in a ...
Ankur ---'s user avatar
2 votes
1 answer
1k views

Aura if and order of execution on conditions

I'm working on showing a component if he is not admin, nor from France, Suisse or Canada : v.userProfile --> true for admins, false otherwise. Even for Swiss users, the component was displayed. I ...
Alexis MASSON's user avatar
1 vote
1 answer
979 views

how can we check 3 condition using aura:if

i have a radiobutton group which contains daily, weekly and monthly. when i choose daily radio option its showing picklist, when i choose weekly its showing picklist but when i select monthly radio ...
cloudZigZag's user avatar
  • 1,366
0 votes
1 answer
869 views

How to change the value of disabled with aura:if?

I have a few text input fields and 1 lightning:input type="file": <lightning:input type="file" name="file" accept="image/jpg" id="photoFile" onchange="{!c.handleFile}" disabled="true"/> I have ...
Yagami Raito's user avatar
1 vote
2 answers
174 views

How do i iterate over a list with 3 different object types in lightning component?

I am building a lighting component which needs to iterate over a list with three different object types but I have run into a problem because I cannot write an aura if expression which checks the ...
user64485's user avatar
3 votes
1 answer
21k views

Aura if - isTrue parameter and multiple conditions

I'm trying this code : <!-- an exemple : isTrue='{!and(v.valueOneIsTrue, v.valueThreeIsTrue)}" >--> <aura:if isTrue="{!AND((v._candidateDetails.contact.Nationalite__c != null), (v....
Alexis MASSON's user avatar
1 vote
1 answer
1k views

How to get checkbox value and change tht button's class with <aura:if>?

I want to change the button's style (class) by clicking and changing checkbox field Selected__c. But I always get class="blueColor" even if checkbox is true. When I write <aura:if isTrue="{!v....
user60684's user avatar
  • 163
0 votes
0 answers
204 views

Lightning component doesn't refresh on second search

I am trying to load a Google map VF page in my lightning component and display leads based on city searched. The component loads properly with the leads on first search but on the second search the ...
SFDCLearner's user avatar
0 votes
1 answer
72 views

Attribute in lightning component is failing to evaluate properly in conditionals

I am unsure of what I am missing here... So I have a child component with an attribute: <aura:attribute name="recordClosed" type="Boolean" /> In the component I am doing something like this: ...
Tyler Dahle's user avatar
  • 2,629
1 vote
1 answer
285 views

Trouble with aura:if

I am not sure why this is not working. I have an aura:if condition, if the check matches then the item should be displayed. Here in this code below I am checking the ofc.agentName is not empty then ...
sumchans's user avatar
  • 651
0 votes
1 answer
262 views

Aura:if - check with a regular expression

Is it possible to write aura:if conditions with regular expressions. Ia m trying remove records if the a certain field in that record is not a number. <aura:if isTrue="{! !add....
sumchans's user avatar
  • 651
1 vote
1 answer
157 views

Aura:if not working as expected?

I am trying to display the price of the item if the price is not equal to 0. Whats would be wrong with the usage below? The '0' here is a currency data type in the custom object. Please advise! <...
sumchans's user avatar
  • 651
6 votes
3 answers
7k views

Aura:If vs Styling to show/hide content

Are there any benefits/negatives from either of the approaches below to conditionally show content in a Lightning component? <aura:if isTrue="{! v.myBoolean }"> The Content </aura:id> ...
Girbot's user avatar
  • 5,405
1 vote
1 answer
132 views

What impact have on performance of page loading when we use multiple Lightning:RecordForm in a single component

We are using multiple lightning:recordForm in different aura:if for the different condition in a single custom Lightning Component for showing different field. Is it the best practice to use ...
sanket kumar's user avatar
1 vote
2 answers
11k views

Conditional Rendering in Lightning Component with more than Aura:If(True, ELSE)

I have a lightning:select picklist on a Lightning component called "Best Method of Contact" which is a required picklist, but the required picklist defaults to a blank 'placeholder' value that the ...
Morgan Marchese's user avatar