function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFSF 

URL formula field with different condition's

I want to created a formula field to generate a URL and the conditions for that is:
entering criteria to generate
when the check box_c X is checked(must condition)
then  (
if picklist A_c has value 1 and Picklist B_c has value 1.1
then generate the URL  https://Example.com/?f=FIRST&l=LAST (First name and last name are the fields on this object)
else
if picklist A_c has value 1 and Picklist B_C has value 1.2
then generate the URL  https://Example.com/?f=FIRST&l=LAST  fields on this object)
else
if picklist A_C has value 1 and Picklist B_c has value 1.3
then generate the URL  https://Example.com/?f=FIRST&l=LAST 
 
the link should only be generated When checkbox_c is checked.
Please let me know how I can achieve this.
Thanks in Advance

 
Best Answer chosen by SF
SFSF
Issue resolved.

I used this formula:

IF(
AND ( Received__c = True,  ISPICKVAL (Skill__c , "CA"), ISPICKVAL (Type__c  , "Standard")),"https://Example.com/?f=" + User__r.FirstName + "&l=" + User__r.LastName,
IF(
AND ( Received__c = True,  ISPICKVAL (Skill__c , "CA", ISPICKVAL (Type__c  , "Master")),"https://Example.comr-master?f=" + user__r.FirstName + "&l=" + User__r.LastName,
NULL
)
)

I created If And statements like this for all the 2 picklist combinations.
 

All Answers

PriyaPriya (Salesforce Developers) 
Hey,

Kindly provide what you have tried for this ?
 

The developer community recommends providing any attempts/code you've started, any errors you're getting, or where exactly you're struggling in achieving this while posting a question.


Thank you,

Priya Ranjan

SFSF
@priya Ranjan

I am new to salesforce. So far I am struck on first logic and getting many errors, if I correct one ending up with another error.
this is the formula I created so far

IF(
(AND( Received__c ,(ISPICKVAL( Skill__c , "CA")), (ISPICKVAL( Type__c , "Standard"))),  HYPERLINK(         "https://c.com/A/?f=" + T__r.FirstName + "&l=" + T__r.LastName, "C A"))

Please help
SFSF
Issue resolved.
PriyaPriya (Salesforce Developers) 

Great Work!!

If you wish, You can post the solution so other may take help from it.

Regards,

Priya Ranjan

SFSF
Issue resolved.

I used this formula:

IF(
AND ( Received__c = True,  ISPICKVAL (Skill__c , "CA"), ISPICKVAL (Type__c  , "Standard")),"https://Example.com/?f=" + User__r.FirstName + "&l=" + User__r.LastName,
IF(
AND ( Received__c = True,  ISPICKVAL (Skill__c , "CA", ISPICKVAL (Type__c  , "Master")),"https://Example.comr-master?f=" + user__r.FirstName + "&l=" + User__r.LastName,
NULL
)
)

I created If And statements like this for all the 2 picklist combinations.
 
This was selected as the best answer