code: function() {
              if (!$scope.component.data.resource || ($scope.resources.length === 0)) {
                return;
              }
              var selected = null;
              $scope.resourceFields = [
                {
                  property: '',
                  title: '{Entire Object}'
                },
                {
                  property: '_id',
                  title: 'Submission Id'
                }
              ];
              if ($scope.formio.projectId) {
                $scope.component.data.project = $scope.formio.projectId;
              }
              for (var index in $scope.resources) {
                if ($scope.resources[index]._id.toString() === $scope.component.data.resource) {
                  selected = $scope.resources[index];
                  break;
                }
              }
              if (selected) {
                var fields = getInputFields(selected.components);
                for (var i in fields) {
                  var field = fields[i];
                  var title = field.label || field.key;
                  $scope.resourceFields.push({
                    property: 'data.' + field.key,
                    title: title
                  });
                }
                if (!$scope.component.valueProperty && $scope.resourceFields.length) {
                  $scope.component.valueProperty = $scope.resourceFields[0].property;
                }
              }
            }
docs: Loads the selected fields.