Start a new topic

Letter code based on gift amount

Does anyone know of a way to set a virtual field or dictionary for Letter Code based on Gift Amount? Gifts of $1000 or more have one letter code, gifts under $1000 have another code.

May I call upon your help one more time?
I have been asked to do the following. If the gift is under $1000, then copy the gift date and populate the Acknowledge Date. If the gift is over $1000, then leave the Acknowledge Date blank.
Thank you!

Hi Marie,


You can use the "seed" functionality to do this pretty easily.  When you set a field as the "seed" for a function then that field becomes the oField in your custom function.  If you do not set a seed field then it is assumed that you want the current field to be the oField value.


So you would need to create a function similar to the last one here and assume that oField is your amount field (because you will set that field as the seed column).  Then the logic is pretty straight-forward, just replace = "" with >= 1000 and you should be most of the way there!


  -Wayne

I'm having some trouble with this. When the value is less than $1000, it is giving me a dollar value in the acknowledgement date. I will always have a gift value. What I want to do is copy the gift date from another column if the gift amount is less tahn $1000. I'm not sure how to do this.
since oField is the amounts field and sReturn is what the Acknowledge Date field will be set to you need to separate the two.

The way the original function was written you set sReturn (value of the Ack Date field) = oField.Value (value of the amount field) at the beginning. Then you only change sReturn if the amount is > $1,000 so it stays set to the amount if it is
Either you can use an Else clause in your If statement (i.e. If sReturn > 1000 Then sReturn = Ack Date ELSE sReturn = "" End If) or you can start by setting sReturn = "" and use oField.Value in your If statement so that if the amount is
I have this working now. Thanks again for your help, Wayne.
Try this:

If oField.Value "Canada" Then

Or even better, this:

If oField.Value.ToUpper "CANADA" Then

Didn't actually try this, so I'm assuming Value is a string that will have the ToUpper function. But this will make sure it works even if the source data is "Canada", "CANADA", or "cAnAdA".
To add on to Jeff's response, to have access to another "seed" or field you would need to specifically call it like this:

Import.Fields.GetByName("NameOfField").Value

So something like:

If oField.Value.ToUpper "CANADA" Or Import.Fields.GetByName("GiftAmount").Value sReturn = "Do Not Receipt"
Else
sReturn = "Not Receipted"
End if
Login or Signup to post a comment