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
sfdeveloper12sfdeveloper12 

Making formula field to display minimum value or either one filled value

Hello,

I am creating a formula field where i am taking minimum value form Online Rate field or PSL rate field.
This is possible using min funcion or in if condition by comparing two values.

Next thing is. If PSL rate is blank then Online rate value should be populated in my formula field. '
If Online rate is blank then Psl rate should be populate in formula filed.

OR(IF(ISNULL(PSL_Rate__c), PSL_Rate__c, Online_Rate__c),IF(ISNULL(Online_Rate__c), Online_Rate__c, PSL_Rate__c))

I used this . But its giving me an error expexcted boolean received number. I have to show whatever will be value in this field. I cant keep it as boolean. What to do now?

Best Regards,
Utkarsha
Varun SinghVarun Singh
HI @utkarsha
can you laso define the field type
Shruti SShruti S
You can use a BLANKVALUE function. Here is the syntax for BLANKVALUE function in Salesforce - 
BLANKVALUE(PSL_Rate__c, Online_Rate__c)
To know more about BLANKVALUE, you can refer this link - https://help.salesforce.com/articleView?id=customize_functions_a_h.htm&type=0&language=en_US
sfdeveloper12sfdeveloper12
Hi VArun,

Online Rate & PSL rate field type is Currency

Thanks,
Utkarsha