Title: Issue with NULL values in mapped fields
Last modified: August 22, 2016

---

# Issue with NULL values in mapped fields

 *  [Ryan](https://wordpress.org/support/users/updraft/)
 * (@updraft)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/issue-with-null-values-in-mapped-fields/)
 * I was having an issue where **some** fields were not being updated in Infusionsoft
   for **existing** contact records. After much testing and troubleshooting I determined(
   with the help of the logs!) that the issue was NULL values being passed in the
   $merge_vars array. Removing the NULL values from the array resolved the issue
   for me.
 * Here’s how I did it:
 * Add a new filter to the plugin by modifying the infusionsoft.php file. I added
   it after the foreach loop in the export_feed() function around line 1693:
 * `$merge_vars = apply_filters('gf_infusionsoft_merge_vars', $merge_vars);`
 * Then in the theme’s functions.php or a custom functions plugin add something 
   like this:
 *     ```
       add_filter('gf_infusionsoft_merge_vars', 'mycustom_gf_infusionsoft_merge_vars');
       function mycustom_gf_infusionsoft_merge_vars($merge_vars) {
       	foreach( $merge_vars as $key => $value ) {
       		if( $value == '' ) {
       			unset($merge_vars[$key]);
       		}
       	}
       	return $merge_vars;
       }
       ```
   
 * Infusionsoft Gravity Forms Add-on team: Could the `gf_infusionsoft_merge_vars`
   filter be added in the next update?
 * [https://wordpress.org/plugins/infusionsoft/](https://wordpress.org/plugins/infusionsoft/)

The topic ‘Issue with NULL values in mapped fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/infusionsoft_ffffff.svg)
 * [Infusionsoft Gravity Forms Add-on](https://wordpress.org/plugins/infusionsoft/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/infusionsoft/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/infusionsoft/)
 * [Active Topics](https://wordpress.org/support/plugin/infusionsoft/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/infusionsoft/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/infusionsoft/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Ryan](https://wordpress.org/support/users/updraft/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/issue-with-null-values-in-mapped-fields/)
 * Status: not resolved