Questions tagged [conditional]

The tag has no usage guidance.

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

Component Visibility in Flow's Screen with Number data type

I'm trying to set up a filter to manage a component visibility in a flow's screen component. In particular, I want the field to be available to the user for the insert of data only when a particular ...
2
votes
1answer
75 views

How do I check if a record exists in Flow Builder?

I have an autolaunched flow to create a record with particular field values, unless a record with the same values already exists. This answer offers a method for interactive flows. This answer says ...
2
votes
1answer
38 views

How to conditionally render inside a datatable in lightning?

I have a lightning datatable and into one column called 'Set Primary Contact' I want to display an icon if the custom field IsPrimaryContact__c has the value TRUE, or a button 'Set primary contact' if ...
0
votes
1answer
48 views

How do I make a field mandatory if the previous field is set to yes?

I need some help with JavaScript code, please. In Salesforce Communities, I have a form that asks a question, if you answer yes, then more fields appear. I want to set it to if yes, those fields ...
2
votes
1answer
125 views

LWC Conditional rendering: alternative for fetching the initial database value?

Looking for a conditional rendering solution in lwc, which uses the initial value of a field in the database to decide whether to render or not. I have found a way to get it working, but it seems like ...
2
votes
1answer
43 views

Only the first IF condition works, and the rest doesn't when nested in Process Builder formula

GOAL: I'm trying to create this criteria in Process Builder where I can detect phone number like (000) 000-0000, 000-000-0000 and 000.000.0000 and turn them into +1 0000000000 format. I tried to ...
0
votes
2answers
36 views

Lighting Aura Controller - If Then on checkbox

I cannot figure out the correct syntax to evaluate a checkbox field on my component. I have to believe I have the syntax wrong because the IF statement is being executed even though the checkbox is ...
2
votes
0answers
121 views

CPQ quoteline conditional custom action

I am trying to set up a conditional Custom Action on a CPQ Quote Line. I only want the Desegment Line Custom Action to appear when a custom field "Segmentation_Editable__c" has a value of true. I ...
0
votes
1answer
44 views

Why does Visualforce inputField using html-disabled = false still disable the field?

In my VF page I need to disable an inputField based on a boolean condition set in my controller. If I add the html-disabled option to the inputField it disables the field, regardless of what I set the ...
0
votes
1answer
81 views

Conditional display of Visualforce page on account layout

I'm new to Salesforce and i wonder how i can conditionally display visualforce page on account page upon that button click as illustrated on image .
0
votes
1answer
76 views

Render if variable contains text value in visualforce

I am trying to use render if condition on a viasualforce based on a value containing a string but this seems not to work. What am I missing? See: <apex:pageBlock title="Manuals"> ...
1
vote
1answer
623 views

LWC: Use data from outer iteration in inner iteration to conditionally render?

let's say I'm building a Kanban board using LWC, and I have the following markup: <template> <div class="kanban-container slds-border_left slds-p-around_medium"> <template ...
2
votes
1answer
32 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 ...
0
votes
0answers
22 views

how to use .getvalues with map and display the picklist value from custom setting on VF page thoghing null pointer exception [duplicate]

have a custom setting called product and under that i created two fields called and other is string field BD__c. i want to display picklist value based on string matching record. my custom setting ...
0
votes
0answers
39 views

how to display picklist values which is stored in custom settings values based on the condition [duplicate]

` public List getTR_ProductList() { system.debug('******Start of getTR_ProductList'); List options = new List(); options.add(new SelectOption('','--Select--')); Map Prod = ...
1
vote
1answer
1k 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....
3
votes
1answer
7k views

Using arithmetic comparison in if:true statement in Lightning web component [duplicate]

I came to a situation where I want to render a text based on there index value. So, Let's assume I am having a loop which is having an index variable and I want to show some specific text if the index ...
1
vote
1answer
46 views

If/else Statement not evaluating issues

I have something weird going on with my code. I have a Data Extension name “DEXT Seeds”. I am checking the DataSourceName_ to see if this list is picked by a user. I have an if/else statement that ...
2
votes
1answer
59 views

Using multiple criteria for IF/THEN function

I am trying to display relevant content to users of a certain type (pro or commercial), but I do have some users that are marked as both. in that case i am using another field (customer type) to ...
0
votes
1answer
384 views

Process Builder Formula Conditions are met

Sorry I've been drilling this for 8 hours and I'm stuck... I can get this to work using "Formula Evaluates to to True" NOT(CONTAINS([User].Email, 'gmail') ) But I can't get it to work using "...
0
votes
2answers
195 views

Compare two columns from different data extensions

I'll get right into it. - I am trying to do the following: I have two DEs one is my send DE, the other is a lookup table. Let's say both data extensions have a column called [STATE]. The send DE ...
1
vote
1answer
74 views

Conditional Visualforce Component call from Visualforce Page

We have to visualforce components. I wanted to call the components based upon a flag on the custom object. I ended up with the following visualforce page, which works, but since I am not really a ...
0
votes
1answer
691 views

ELSE IF Condition in Ampscript

I'm working on a cloud page where i would like to use an ELSE IF condition instead of two IF conditions. Does any one know a syntax for ELSE IF Below is my current Ampscript code. These are captured ...
1
vote
1answer
53 views

Is there a way a more efficient way to write the IF statement

Is the there a more efficient way to write the below IF statement so I only need 2 lines of code or can this be solved with a ternary operator ? if(postIds.size()>0) { PostProperty(...
1
vote
1answer
53 views

Nested Parentheses in an If condition

I'm refactoring legacy code and I'm having a challenging time unraveling the order in which these conditions are evaluated. I'm assuming the two most nested conditions take precedence but I haven't ...
-4
votes
2answers
73 views

Visual Force render text based on conditional? [closed]

I want to make an output text render specific text based on a condition, for example, a variable is a certain value. Is there a way to do an if statement in VF?
1
vote
2answers
3k 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 ...
0
votes
1answer
40 views

If condition not working

If condition in a trigger has weird results. My condition is, if there are no values from my Set collection do not proceed. Even my debug statement shows NULL value. why this is happening?? if(...
0
votes
3answers
293 views

Aura:if displays both options

I have a problem with aura if in lightning component, the condition doesn't work, my code below : <aura:if isTrue="{!v.account.cel_email_mailable__c != 'N' }"> <div onclick="{!c....
3
votes
1answer
6k views

lightning component empty field check?

<aura:attribute name="guid" type="String" default="{!v.simpleRecord.Loan_Guid__c}"/> <aura:attribute name="fileCreated" type="Boolean" default="{!v.guid != '' ? true : false}"/> ...
5
votes
1answer
278 views

Failing to conditionally render Lightning component after setting value from Promise callback

The Goal I am trying to conditionally render a component after a user successfully uploads a CSV file. Here is the markup for the conditional rendering. Details have been omitted: <!-- Create ...
0
votes
1answer
24 views

How to make varaible of items in a iteration in a lightning component

I have an iteration which reproduces a list on a lightning page. I want to make this iteration variable based on 2 lists. How do I make the list (items) variable based on IF condition? Or do I need to ...
0
votes
1answer
2k views

Process builder check for specific user

I want my process builder conditions to update for all users except for one particular user. There is not a User option, only Owner and Profile. But the Owner of an object does not mean another user ...
2
votes
2answers
904 views

What is the purpose of this conditional markup?

I am trying to sort records and I encountered the below markup in a Visualforce Page: <apex:commandLink action="{!ViewData}" value="Phone{!IF(sortExpression=='Phone',IF(sortDirection='ASC','?','?')...
0
votes
1answer
30 views

Using If condtion in Visual Force page

I am trying to display fields on the basis is value is null or not. I have used below code. Its not working. I am still wondering where is mistake. I checked and confirms c.FlagEncrypted__c has ...
2
votes
1answer
277 views

How to cover condition referencing record type name in apex test class?

I'm having a hard time covering the condition in my class wherein it is checking for a specific record type name. In my test class, I've already inserted the record type desired, but there's a portion ...
2
votes
1answer
2k views

Conditionally Render A Lightning Quick Action? [closed]

I've have a component that implements force:lightningQuickAction but would like to have conditional rendering (i.e only display on the page layout if a bool field == true). I've been researching, but ...
2
votes
0answers
153 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 ...
0
votes
2answers
55 views

IF this or this or this?

I am trying to implement the below code, but I get this error: OR operator can only be applied to Boolean expressions Code: public class Segment { static List<Map<String, Object>> ...
1
vote
3answers
1k views

IF Statement AMPscript

Error I'm getting: "An IF statement is not closed with the required ENDIF statement" Please help! %%[IF @EventType=='Lunch n' Learn' THEN]%% SET @Image = Image('b3272b99-f070-4e84-a65e-2a6cae73c794')...
0
votes
2answers
271 views

Condition on column visualfoce page

Is it possible to render column values based on condition in a visualforce page? I tried <apex:outputText rendered="{!b.account.name == !a.account.name}"> <apex:column value="{!b.name}"/...
0
votes
1answer
45 views

Is it possible to write a conditional statement in the head markup of a visualforce page?

I want to write a functional statement in the head markup of a VisualForce page. Is this possible? If it is possible, what is the right way to write it? I want a different href depending on the ...
2
votes
2answers
344 views

Apex class: if objType = Project do nothing else proceed?

Forgive me but I'm a bit of a newb when it comes to Apex and found below that was written by a previous developer who worked for my company. Handler creates a task after user inserts an attachment. ...
0
votes
3answers
92 views

Conditional string based on Parameter from URL

I have passed some Parameters across the URL string and I am trying to display one of two strings dependant on the value. I'm not getting any errors in my apex or on my VFP but it is returning blank. ...
0
votes
1answer
35 views

Choose only one field

I have two fields in an object, I need choose only one of these fields. I tried using: <apex:inputField label="{!If(lang=='en' ,'Event type','Tipo de evento')}" value="{!If(lang=='en', nl....
1
vote
2answers
247 views

disable apex:commandButton is not working

Apex class: public Integer sCount {get;set;} Attachments = [SELECT Id,Name FROM Attachment WHERE Parentid =:caseId ]; Integer sCount = Attachments.size(); Vf page: <apex:commandButton ...
0
votes
1answer
56 views

How do I output 1 field value from a related based on the condition that there is 1 record with that value

How do I output 1 field value from a relatedlist based on the condition that there is 1 record with that value. I tried the following but I get an syntax error see:<apex:repeat var="ex" value="{!...
2
votes
2answers
1k views

Display tabs conditionally in record page

In the custom record page for an object, can I show or hide tabs based on record type? For example, I want to show a tab "Incident Details" if record is an Incident and "Service Request Details" if ...
1
vote
1answer
94 views

Build a Query from User Input - Too Many Permutations of If Logic

I have a Visualforce page that allows users to filter a list records based their filter criteria. My issue is that I end up having to make a permutation for every possible combination of their ...
1
vote
2answers
289 views

Inline Conditional Visualforce

I have a simple question that seems to be escaping me at the moment... The typical way I use inline conditionals is: {!IF(booleanValue,"SOMECONTENT-IF VALUE IS TRUE", "SOMEOTHERCONTENT-IF VALUE IS ...