Questions tagged [conditional]

The tag has no usage guidance.

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

Currency Formatting Issue in Conga Template Conditional Statements

I am encountering a problem with currency formatting in a Conga Word template while using conditional statements. The specific code snippet in question is as follows: { if "«...
0 votes
0 answers
21 views

In GTL datasource can I have conditional content appear based on the first instance only?

I'm using Amspscript and GTL datasource to extract information from a field in a data extension called: cancelled. This field has multiple items in there and within cancelled there is another field ...
3 votes
1 answer
3k 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
2 answers
1k views

Lightning Inputfield Conditional Required Field

I am trying to make one of my input fields conditionally required based on a checkbox value of false. Is this possible using a standard 'required' attribute in Lightning/Aura? The below doesn't seem ...
0 votes
1 answer
60 views

LWC Conditional render to show a field in a data table if that field has value

I'm trying to show or not show the content of field in a data table depending on if it is null or empty etc. What am I doing wrong? <th scope="col"> <div lwc:if={isNotes}&...
0 votes
2 answers
97 views

Bypass lookup filter

I have a lookup filter which I want to bypass as a system administrator when doing i.e. data imports. I found possible solutions but they dont seem to be working. Added a second filter condition OR ...
0 votes
2 answers
959 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
2 answers
59 views

getting a 'Missing return statment required' even though i have one

I have a method: public static String doCallout(String requestJson, String recordId){ HttpRequest req = new HttpRequest(); req.setEndpoint(END_POINT_URL); req.setHeader('Content-Type', '...
1 vote
1 answer
1k 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 ...
7 votes
1 answer
6k views

LWC: Do I have to use a template element with if:true?

The Lightning Web Components Dev Guide gives this example in the article titled Render HTML Conditionally, where a conditionally-rendered div element is wrapped in a template element containing an if:...
5 votes
1 answer
1k 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
1 answer
840 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
1 answer
2k views

I want to render two data table based on condition..both data table are present in the same lightning web component!

here I have one product data table without checkbox,this is the default one,but when I navigate from opportunity page to product page to add products to opportunity,to add product I need to render ...
6 votes
2 answers
28k 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 ...
-1 votes
1 answer
49 views

How to write a Formula to have a checkbox checked by default and if the case is reopened, uncheck the box to track First Contact Resolution?

For example, if a customer comes in and a case is created, the FCR (First Contact Resolution) Checkbox is already checked by default, then if the Case has a status of Resolved and it changes, meaning ...
0 votes
2 answers
79 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", "...
0 votes
1 answer
310 views

Using ampscript check if value exists in data extension

I have a customer_data_extension that consists of customers with their customer_id. I'm creating an email with conditional content, so IF customer exists in customer_data_extension then show this ...
0 votes
2 answers
41 views

Struggling with syntax errors on and IF AND statement

I seem to always be struggling with resolving syntax errors on my IF code. I have used VS editor so it's easier to read and I don't think it's a parenthisis issue. Getting the error message "The ...
1 vote
1 answer
793 views

Can I nest AND and OR statements as part of a condition for allowing a Flow?

I am fairly new to Flows, and I've never had to setup a complex condition. I can't figure out how to set up what I need. This is what I'm trying to get: We have a Flow that is triggered if an ...
1 vote
2 answers
1k views

Conditional Criteria on Lightning button disabled attribute doesn't work

Can someone help me how to make this work please. Wanted to disable the button based on the following criteria //Diabled criteria - MUST be disbaled for all rows except for last row. //Background - we ...
1 vote
2 answers
397 views

Make Reminder Flow work when Event.DueDate changes

I have a Time-Triggered Flow that reminds people one week before the Meeting Due Date. That is easily implementable. But now I also want to cover the use case where somebody changed the Due Date. In ...
-1 votes
1 answer
49 views

How to pass value to attribute in visualforce page

I have an attribute which I want to pass to a visualforce component, how do I achieve this. Currently I get the error: expecting a boolean Photoshoot="{!IF(!opportunity.Quote__r.Photoshoot__c!='',...
0 votes
1 answer
421 views

Convert check box result to yes, no in email template

I'm trying to use a conditional statement in a salesforce email text template, field is a check box and i want the output in the email template to be yes or no. I'm using the below but it is not ...
0 votes
1 answer
44 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 ...
5 votes
4 answers
4k views

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

LWC Conditional Output Field [duplicate]

I am looping through a list in LWC and want to render the field if there is a value and if there is no a value then I want to default it to a dash ( - or 0). I understand that we can conditionally ...
0 votes
1 answer
335 views

Email nested if statement AMPScript with HTML

I need to have a nested if statement with some HTML inside. Like this. %%[ IF (NOT EMPTY(@Var1) THEN ]%% <!-- HTML goes here --> %%[ IF (NOT EMPTY(@Var2) THEN <!-- HTML ...
0 votes
1 answer
54 views

Conditional Formatting Visualforce Cells

Hello there, I am attempting to re-create the lightning stage path with branching stages. I built a Visualforce table with the bare-bones of these stages, but am running into trouble when I go to add ...
0 votes
1 answer
74 views

Error in a formula with several if

I am trying to create a formula field to display a "clean" value for our revenue. It is a formula based on opportunity fields and it's a field displayed in the opportunity itself. We have ...
0 votes
2 answers
771 views

render child component div in lwc by matching data-attributes on button click

I have a component that displays a list of questions using a for:each. For each question rendered I have a child component (which is a simple form with a few fields) to capture a followup question. I ...
1 vote
1 answer
621 views

Using Date fields in process builder as conditions

I am trying to use date fields as part of my condition in a process builder to say: If field #1 (number) has value > 0 AND field #2 (date) is less than 30 days ago (ie. date is within the last 30 ...
-2 votes
1 answer
182 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'
1 vote
1 answer
11k views

Adding conditional logic (IF, THEN) in Salesforce HTML email templates

I'm struggling with adding IF, THEN conidition to my HTML Classic Email template and hoping someone can help. I am trying to say if Cohort Owner's name is 'X', then post the X link, if Cohort Owner's ...
1 vote
1 answer
419 views

Is it possible to delete a record created during a flow interview that has been interrupted?

I have a screen flow where a user creates a record in one screen, and in the next screen the user uploads a file to the record that has just been created. Then, the user presses a button that launches ...
0 votes
1 answer
3k views

Add a div element depending on condition in LWC

Hello, I develop a LWC and I have 2 displays because a condition. They are very similar but a "div" element is inside the second display but it is on the top of the LWC. This is my first ...
0 votes
2 answers
1k views

Conditionally disabling an editable field in lightning Datatable

I have a requirement that an editable field in Datatable should be editable on certain conditions for example lets say, i have a field Disable_Action__c which is a formula field , when this field ...
0 votes
2 answers
78 views

Simple Apex code snippet not behaving as expected

Integer delay = 1; for(Integer i=1;i<=5;i++) { System.debug('Print '+i); Long sTime = System.now().getTime(); while ( (System.now().getTime()/1000 - sTime/1000) < delay){} } When ...
0 votes
1 answer
4k views

Need help using IF statement in Salesforce Flows

We're moving to Flows and I need a bit of help on IF statements in Salesforce. I've tried a few variations but with the IF statement when creating a DATE formula but I keep getting “Syntax error. ...
0 votes
1 answer
194 views

Flow Decision Condition is failing

I have a custom Object Request__c These are the fields on the Request__c record Account_Executive__c (lookup to Contact record) Central_Services__c (lookup to Contact record) Opportunity__c ...
1 vote
1 answer
183 views

onchange handler not displaying together with my if:true directive

I am doing this udemy course for LWC Development and I am stuck on the part for conditional rendering. My goal is that I should be able to show and hide the div with the use if if:true and if:false ...
0 votes
1 answer
69 views

How can I use substitute in combination with if condition

Our Salesrep can write some text in a textbox field which is related to a campaign. This field should print on the letter. The Salesrep can use some words which are substitute in the process. If the ...
0 votes
2 answers
2k views

Formula field date subtraction

I have a formula field as a boolean which should return true if the date of today and enddate has less than 3 months in between and the enddate field is not empty. I dont get the correct results. ...
1 vote
1 answer
1k views

Get Records with condition not working in Flow

I am working on an assignment in which I developed a screen flow. The screen flow gets triggered with a "Create Invoice" button on the opportunity. When the user clicks the "Create ...
2 votes
1 answer
600 views

Illegal conversion from List<String> to List<Beverage__c>

I have trouble with a component in an Experience site. I'm doing a search bar, which makes a search in the information of two components. It has to show the coincidence or a message like "there's ...
0 votes
1 answer
583 views

Alternatives for multiple If statements

I need to compare the fields and depending on that if its true then update a boolean variable and if its false then capture this field and get the label and append it to a string. I have like 10-12 ...
0 votes
1 answer
118 views

Render code if condition is true

I want to render the span syntax only if the wrapper.AccHead is not empty. I tried the code below, but it does'nt work. I tried also to use the rendered syntax in span but it does' nt work. Is there a ...
0 votes
1 answer
179 views

Declare CSS stylesheet based on condition in controller

I have a Visualforce page which has a default CSS stylesheet declared, which is always used for general styling. What I would like to do, however, is have alternate stylesheets to change brand colours ...
3 votes
1 answer
307 views

replacing visualforce conditional rendering formulas in LWC

so I'm migrating a visualforce component into LWC. In that component, there is a table rendered, and a lot of columns are rendered differently depending on data field values and/or some other ...
0 votes
2 answers
191 views

Aura Redirect Component Only if CustomerID is not Null

I wrote code for an Aura Redirect Component but I'm having trouble getting it to redirect only if the CustomerId is not null. Here's my code. Apex Controller public with sharing class NetsuiteQuote { ...
1 vote
1 answer
415 views

How to do binary conditional rendering lightning web component [duplicate]

I have created a lightning web component to show several related object tables on a detailpage. Above one of the tables I want to show some extra specific data related to one of the object tables. We ...