• Kris Weixel
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies
I have a formula field, "Age", that caluclates the ages of our clients.  Age is set up as a text return type and has this formula:
IF(TODAY() >=Date(YEAR(TODAY()), 
MONTH(Birthdate), DAY(Birthdate)), 
TEXT(YEAR(TODAY()) - YEAR(Birthdate)), 
TEXT(YEAR(TODAY()) - YEAR(Birthdate) - 1))  

I want to create an "age range" field, so created another formula field with a return type of text, but keep getting the error:  Error: Incorrect parameter type for operator '>'. Expected Text, received Number.  Here is my formula:  

IF(age__c>"18","19+",
IF(age__c>="15","15-18",
IF(age__c>="10","10-14",
IF(age__c>="6","6-9",
IF(age__c>="3","3-5",
IF(age__c<="2","None"))))))

I get an error too if I try to change my age field to a number and try it from that way.  

Thanks for any help!
Kris
Hi,

I'm trying to pull in a date field (payment date) from one object to another.  No matter what i try, i get an error that my payments object (PPT2__Payments__c) does not exist.  The api name of my payments object is ​PPT2__Payments__c, so i was trying to use this formula:

PPT2__Payments__c.PPT2__Payment_Date__c 

I'm also trying to understand why sometimes the formula is an __r and sometimes an __c.  What is the difference?  

Thanks in advance!
Kris
Hi,

I am trying to get the text value of a lookup field instead of the record id.  I have a patient record that has an insurance provider field, which is a look-up field for any records that have an insurance provider record type.  I'm trying to pull this field over to a second object which is for patient events (sessions).  On my patient event object, i use this formula:   

PPT2__Patient__r.PPT2__Insurance_Provider__c

This formula displays the record id for the insurance provider, not the actual name of the insurance provider.    I know my answer has to deal with the formatting of this, but i can't figure it out.  Any help is greatly appreciated!!!!

Thanks much!
I have a formula field, "Age", that caluclates the ages of our clients.  Age is set up as a text return type and has this formula:
IF(TODAY() >=Date(YEAR(TODAY()), 
MONTH(Birthdate), DAY(Birthdate)), 
TEXT(YEAR(TODAY()) - YEAR(Birthdate)), 
TEXT(YEAR(TODAY()) - YEAR(Birthdate) - 1))  

I want to create an "age range" field, so created another formula field with a return type of text, but keep getting the error:  Error: Incorrect parameter type for operator '>'. Expected Text, received Number.  Here is my formula:  

IF(age__c>"18","19+",
IF(age__c>="15","15-18",
IF(age__c>="10","10-14",
IF(age__c>="6","6-9",
IF(age__c>="3","3-5",
IF(age__c<="2","None"))))))

I get an error too if I try to change my age field to a number and try it from that way.  

Thanks for any help!
Kris
Hi,

I'm trying to pull in a date field (payment date) from one object to another.  No matter what i try, i get an error that my payments object (PPT2__Payments__c) does not exist.  The api name of my payments object is ​PPT2__Payments__c, so i was trying to use this formula:

PPT2__Payments__c.PPT2__Payment_Date__c 

I'm also trying to understand why sometimes the formula is an __r and sometimes an __c.  What is the difference?  

Thanks in advance!
Kris
Hi,

I am trying to get the text value of a lookup field instead of the record id.  I have a patient record that has an insurance provider field, which is a look-up field for any records that have an insurance provider record type.  I'm trying to pull this field over to a second object which is for patient events (sessions).  On my patient event object, i use this formula:   

PPT2__Patient__r.PPT2__Insurance_Provider__c

This formula displays the record id for the insurance provider, not the actual name of the insurance provider.    I know my answer has to deal with the formatting of this, but i can't figure it out.  Any help is greatly appreciated!!!!

Thanks much!