Skip to main content

#Picklist Dependency0 discussing

Hi everyone,

 

So I'm trying to create a formula field that auto populates with a date, based on the specific text in a picklist value. 

 

If a certain camp is selected in the opportunity record, I want the date to autopopulate to six weeks before the camp begins. 

 

Here's my formula...

 

IF(ISPICKVAL(Type,"Adventure Camp A (Residential) 22nd – 26th July 2024"), DATE(2024,06,2024), DATE(2024,07,01) )

 

At the moment, it's only displaying 2024,07,01, but it seems to me that the date should be displaying 2024, 06,2024, because the picklist value for 'Type' is displaying as  Adventure Camp A (Residential) 22nd – 26th July 2024.

 

Can anyone tell me what I'm getting wrong?

 

Thanks!!

 

#Formulas  #Automation  #Picklist Dependency

5 answers
  1. Feb 15, 2024, 8:01 PM

    @Thomas Rawling

    • Make sure that the formula field's return type is set to "Date". If it's set to "DateTime" or any other data type, it will not display as expected.
    • Ensure the formula's syntax is correct without extra commas or parentheses.
    • Verify that the picklist value matches exactly as it appears in the formula. This includes checking for trailing spaces, capitalization, and any special characters.
    • Sometimes, the formula fields do not recalculate until the record has been updated. Try editing and saving the record to see if the formula recalculates.
    • Confirm that the formula field is placed on the page layout and that the field-level security settings allow you to see the field.
    • If there are any dependent picklists or other fields that are related to this formula, ensure they are set up correctly.

    IF(

    ISPICKVAL(Type, "Adventure Camp A (Residential) 22nd – 26th July 2024"),

    TODAY() - 42,

    TODAY()

    )

    This will test if the formula can correctly calculate a date based on the current date. If this works, then gradually build up to the desired formula, ensuring each step works as expected

0/9000

How can I make picklist value only available for flow but not for user manual update? I have a value called as "Phishing" for the case reason field but I do not want user to manually updating this value. I update this value from screen flow when user click button "Phishing". Thank you, Mit

 

#Flow  #Data Management  #Service Cloud  #Picklist Dependency

7 answers
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    Mar 5, 2024, 8:11 AM

    Hi Mit,

     

    Then I would create a record type on Cases and remove this Phishing value on Case Reason from the record type. Users will therefore be able to use other values on the picklist itself.

    Now, your screenflow should still be able to update the Case Reason to Phishing. One thing, your screenflow may need to run in system context instead of user context (in the flow, click on the gear icon -top left> Show Advanced> How to run the flow> System Context with/without sharing)

0/9000
2 answers
0/9000

I am using the Account Contact Relationship object to define the role each contact has with the account. The account can be a record type of Shop Account or Customer Account. Depending on the record type of the Account, only specific values in the roles multi-select picklist field of the related list (Account Contact Relationship) should display:

 

Shop Account: Owner, Manager, Provider

Customer Account: Owner, Driver, Dispatcher

 

What are my options for accomplishing this? For this use case, what is the best option?

 

#Picklist Dependency  #Dependent Picklist Relationships  #Record Types

2 answers
  1. Feb 21, 2024, 8:11 PM

    @Caleb Markovich,

     

    This won't be possible declaratively.

    You will have to opt for custom LWC/Aura component along with an Apex class.

0/9000

Hi Team, 

I am trying to create a validation rule where if I have a picklist value named " Current Medical " Yes/No

If "Current Medical " = Yes than "Benefits Carrier" Shows Up as a text field

If "Current Medical" = No , than "Benefits Carrier" Doesn't show up 

Thank you very much for your help. 

 

#Validation Rule  #Sql Queries  #Picklist Dependency

2 answers
  1. Feb 21, 2024, 2:42 PM

    Thank you so much, I really appreciate your help. 

0/9000

Good day trailblazers!

 

I've an object with a type field and a due date. The due date has a formula:

IF(OR("API_name"="X", "API_name"="Y", "API_name"="Z"),Today()+30,Today()+7)

 

When I create a new record, the API_name field is empty, and doesn't match the X, Y an Z value. It therefor defaults to a due date of Today()+7. But here's my issue, when I manually select value X, Y or Z in the API_name field, the Due date field is not being updated according to its formula.

 

Any ideas how I can manage this?

 

#Formulas  #Picklist Dependency  #Topics for Objects

10 answers
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    Feb 15, 2024, 9:32 AM

    Are you trying to create a "normal" date field and is this in the default formula? If so, you cannot use a field on the record:

    https://help.salesforce.com/s/articleView?id=000392562&type=1

     

    Q: I am trying to reference a field on the record in the formula for the default value of a field, but it is not available

    A: Default values are only available on creation of a record. At that point, no field has any value until the record is saved, hence why you cannot reference any field on the record itself.

    You could use a record-triggered flow to populate the field, but this would only show after saving, or you could use a Quick Action and add a predefined value for this specific field

     

    What you need to do is to create a formual field that will return a date, or as stated above, a record triggered flow to update the date field

0/9000

Hi @Eric Lerner 

 

Just saw in a previous post you know a bit about the Contact Support Form in Spring '18 - hoping you have some insights on the following:

 

I have created Global Action to be used in this component. It has two picklist fields, one is dependent on the other.

 

When I am logged into our community, the picklist dependency works fine. However, if I am viewing the community as a guest, the form works find, but the picklist dependency no longer works (ie: the first list has no effect on the options in the dependent list).

 

Any idea why this is happening?

 

Thanks

11 comments
  1. Mar 15, 2018, 10:43 PM
    Thanks all for sharing --keeping tabs on this one for backlog consideration.
0/9000