Skip to main content
I am creating a fomula field that is subtracting a base amount from an approved amount.  The approved amount is a currency field.  This is straightforward, but with a catch.  I want this to only subtract from the base amount if a particular record type is chosen and it has been approved.  The Record Type Name is Conference Seminar and the Approved field is a lookup field. 

 

Ahilesh has been a big help with creating the formula, which is listed out below.  

 

1000 - IF( AND( RecordType.Name = "Conference Seminar Approval", NOT(ISBLANK(Approved_By__c)) ), $User.Remaining_Conference_Amount__c, 0 )

 

My follow up is I need the formula field to still show the running balance before it is approved.  The field is pulling exactly how I want once it is approved, but until then the value is always a constant $1000.  How can I modify the formula to show the existing value as well until approved?

 

Thanks, 

 

Mike
2 个回答
  1. 2019年11月1日 05:26
    Hi Michael,

     

    If you want the balance to show only for this record type then try this:

     

    IF( AND( RecordType.Name = "Conference Seminar Approval", NOT(ISBLANK(Approved_By__c)) ), 1000 - $User.Remaining_Conference_Amount__c,

     

    IF( AND( RecordType.Name = "Conference Seminar Approval", ISBLANK(Approved_By__c) ), $User.Remaining_Conference_Amount__c, 0 ))

     

    If you want to see the balance regardless of the record type (and only worry about deducing it from 1000 when it is in the record type and approved):

     

    IF( AND( RecordType.Name = "Conference Seminar Approval", NOT(ISBLANK(Approved_By__c)) ), 1000 - $User.Remaining_Conference_Amount__c, $User.Remaining_Conference_Amount__c )