REAPI getting Fund Descriptions

Options
This project uses the RE API and C# and I am working on displaying the Donor's giving history but am having trouble getting the Fund Descriptions for their gifts.

As you can see by the picture below I am loading the EGiftSplitFields.GIFTSPLIT_fld_Fund into the Fund column and I am temporarily putting the EGiftSplitFields.GIFTSPLIT_fld_Fund_RECORDID into the Fund Description column since I cannot find an option within EGiftSplitFields that gives me the Fund Description.
11941b9357281820786a6dcb224009f3-huge-ca

How would I use the Fund or Fund_RECORDID to get the Fund Description?

 
Below is the code with a highlighted row where I am temporarily putting the FundRECORDID into the Fund Description column.
CGifts gifts = new CGifts();
        gifts.Init(API.SessionContext, TopViewFilter_Gift.tvf_Gift_UseFilterObject);
        gifts.FilterObject.DateRange = EBBDateTypes.bbDATE_SPECIFICRANGE;

 
        gifts.FilterObject.StartDate = startdate;
        gifts.FilterObject.EndDate = enddate;
        gifts.FilterObject.ConstitRecordID = ID;

 
        gifts.SortField = EGiftFields.GIFT_fld_Date;
        gifts.SortOrder = bbSortOrders.Descending;

 

        foreach (CGift gift in gifts)
        {

            String type = (gift.Fields[EGiftFields.GIFT_fld_Type] ?? "").ToString();

            if (type != "Recurring Gift")
            {

                Gift current = new Gift();
                current.Total = Convert.ToDecimal((gift.Fields[EGiftFields.GIFT_fld_Amount] ?? "").ToString());
                current.isSoftCredit = (gift.Fields[EGiftFields.GIFT_fld_Type] ?? "").ToString().Contains("__SC");
                current.isRecurring = (type == "Recurring Gift Pay-Cash");

 
                current.Year = DateTime.Parse((gift.Fields[EGiftFields.GIFT_fld_Date] ?? "").ToString()).Year.ToString();
                current.GiftDate = (gift.Fields[EGiftFields.GIFT_fld_Date] ?? "").ToString();

 

                foreach (CGiftSplit split in gift.Splits)
                {
                    current.Split.Add(new Split()
                    {
                        Amount = Convert.ToDecimal((split.Fields[EGiftSplitFields.GIFTSPLIT_fld_Amount] ?? "").ToString()),

                                          Description = (split.Fields[EGiftSplitFields.GIFTSPLIT_fld_Fund_RECORDID] ?? "").ToString(),
                        Fund = (split.Fields[EGiftSplitFields.GIFTSPLIT_fld_Fund] ?? "").ToString()
                    });
                }
                current.Count = current.Split.Count;

 

                if (!current.isSoftCredit)
                {
                    results.Total += current.Total;
                    results.Count++;
                }

 
                results.Gifts.Add(current);
            }
        }
        gifts.CloseDown();

How do I get the Fund Description?

Categories