private static void AddScalarOrRecset(string dataPartFieldData, Dev2DataLanguageParser dataLanguageParser, Dictionary <IDataListVerifyPart, string> unique, ref IDataListVerifyPart verifyPart, string[] fieldList, ref string fullyFormattedStringValue)
 {
     // If the workflow field is simply a scalar or a record set without a child
     if (dataPartFieldData.EndsWith(")") && dataPartFieldData == fieldList[0])
     {
         if (dataPartFieldData.Contains("("))
         {
             fullyFormattedStringValue = RemoveRecordSetBrace(fieldList[0]);
             var intellisenseResult = dataLanguageParser.ValidateName(fullyFormattedStringValue, "");
             if (intellisenseResult == null)
             {
                 verifyPart = IntellisenseFactory.CreateDataListValidationRecordsetPart(fullyFormattedStringValue, String.Empty);
                 AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
             }
         }
     }
     else
     {
         var intellisenseResult = dataLanguageParser.ValidateName(dataPartFieldData, "");
         if (intellisenseResult == null)
         {
             verifyPart = IntellisenseFactory.CreateDataListValidationScalarPart(RemoveRecordSetBrace(dataPartFieldData));
             AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
         }
     }
 }
        public override string ValidateName(string name)
        {
            Dev2DataLanguageParser parser = new Dev2DataLanguageParser();

            if (!string.IsNullOrEmpty(name))
            {
                var fieldName = DataListUtil.ExtractFieldNameFromValue(name);
                var recName   = DataListUtil.ExtractRecordsetNameFromValue(name);
                if (!string.IsNullOrEmpty(recName))
                {
                    var intellisenseResult = parser.ValidateName(recName, "Recordset");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                    else
                    {
                        if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                        {
                            RemoveError();
                        }
                    }
                }
                if (!string.IsNullOrEmpty(fieldName))
                {
                    var intellisenseResult = parser.ValidateName(fieldName, "Recordset field");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                    else
                    {
                        if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                        {
                            RemoveError();
                            name = fieldName;
                        }
                    }
                }
                else
                {
                    var intellisenseResult = parser.ValidateName(name, "Recordset field");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                }
            }
            return(name);
        }
Exemple #3
0
        public override string ValidateName(string name)
        {
            var nameToCheck = name.Replace("@", "");
            var isArray     = name.EndsWith("()");
            Dev2DataLanguageParser parser = new Dev2DataLanguageParser();

            if (!string.IsNullOrEmpty(nameToCheck))
            {
                nameToCheck = DataListUtil.RemoveRecordsetBracketsFromValue(nameToCheck);

                if (!string.IsNullOrEmpty(nameToCheck))
                {
                    var intellisenseResult = parser.ValidateName(nameToCheck, "Complex Object");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                    else
                    {
                        if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                        {
                            RemoveError();
                        }
                    }
                }
            }
            if (isArray)
            {
                nameToCheck = nameToCheck + "()";
            }
            return(nameToCheck);
        }
Exemple #4
0
        public override string ValidateName(string name)
        {
            var parser = new Dev2DataLanguageParser();

            if (!string.IsNullOrEmpty(name))
            {
                var fieldName = DataListUtil.ExtractFieldNameFromValue(name);
                var recName   = DataListUtil.ExtractRecordsetNameFromValue(name);
                if (!string.IsNullOrEmpty(recName))
                {
                    ValidateName(parser, recName);
                }
                if (!string.IsNullOrEmpty(fieldName))
                {
                    name = ValidateName(name, parser, fieldName);
                }
                else
                {
                    var intellisenseResult = parser.ValidateName(name, "Recordset field");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                }
            }
            return(name);
        }
Exemple #5
0
        public override IActionableErrorInfo Check()
        {
            var value = GetValue();

            if (string.IsNullOrEmpty(value))
            {
                return(null);
            }

            var result = value.TryParseVariables(out _outputValue, DoError, LabelText, _variableValue, _inputs);

            if (result != null)
            {
                if (string.Equals(value, _outputValue))
                {
                    _outputValue = _variableValue;
                }
                return(result);
            }

            var parser = new Dev2DataLanguageParser();

            var results = parser.ParseDataLanguageForIntellisense(value, _datalist);

            if (DataListUtil.IsEvaluated(value) && !DataListUtil.IsValueRecordset(value))
            {
                var validRegions = Dev2.DataList.Contract.DataListCleaningUtils.SplitIntoRegions(value);
                foreach (var region in validRegions)
                {
                    var intellisenseResult = parser.ValidateName(DataListUtil.RemoveLanguageBrackets(region), "");
                    if (intellisenseResult != null && intellisenseResult.Type == enIntellisenseResultType.Error)
                    {
                        results.Add(intellisenseResult);
                    }
                }
            }

            var error = results.FirstOrDefault(r => r.Type == enIntellisenseResultType.Error);

            if (error != null)
            {
                if (string.Equals(value, _outputValue))
                {
                    _outputValue = _variableValue;
                }

                return(new ActionableErrorInfo(DoError)
                {
                    ErrorType = ErrorType.Critical,
                    Message = (string.IsNullOrEmpty(LabelText) ? "" : LabelText + " - ")
                              + error.Message
                });
            }
            return(null);
        }
        static bool IsJSonInputValid(string dataPartFieldData, Dev2DataLanguageParser dataLanguageParser)
        {
            var isValid = false;

            if (dataPartFieldData.Length < 1 || dataPartFieldData[0] != '@')
            {
                return(isValid);
            }

            var removeBrace        = dataPartFieldData.Contains("()") ? dataPartFieldData.Replace("()", "") : RemoveRecordSetBrace(dataPartFieldData);
            var replaceAtSign      = removeBrace.Replace("@", "");
            var intellisenseResult = dataLanguageParser.ValidateName(string.IsNullOrEmpty(replaceAtSign) ? dataPartFieldData : replaceAtSign, "");

            if (intellisenseResult == null)
            {
                isValid = true;
            }
            else
            {
                isValid = isValidObject(intellisenseResult);
                if (!isValid)
                {
                    isValid = isValidParts();
                }
            }
            return(isValid);


            bool isValidObject(IIntellisenseResult resultError)
            {
                var indexOfAtSign = dataPartFieldData.IndexOf("@", StringComparison.Ordinal);

                if (indexOfAtSign == 0 && (dataPartFieldData.Length >= 2) && char.IsLetter(dataPartFieldData[1]) && !resultError.Message.Contains("invalid char"))
                {
                    return(true);
                }
                return(false);
            }

            bool isValidParts()
            {
                if (dataPartFieldData.Contains("."))
                {
                    var fields = dataPartFieldData.Substring(1).Split('.');
                    if (fields.All(p => !string.IsNullOrEmpty(p) && char.IsLetter(p[0])))
                    {
                        return(true);
                    }
                }
                return(false);
            }
        }
Exemple #7
0
        public void Dev2DataLanguageParser_ValidateName()
        {
            //---------------Set up test pack-------------------
            const string dataList = @"<doc><recName1 Description=""RecName1 Description""><field1 Description=""field1 Desc"" /><field2 Description=""field2 Desc"" /></recName1><recName2 Description=""RecName2 Description"" /></doc>";

            var parser = new Dev2DataLanguageParser();
            var result = parser.ParseDataLanguageForIntellisense("[[recName1.field", dataList, false, null, true);

            Assert.AreEqual(enIntellisenseErrorCode.None, result[0].ErrorCode);
            Assert.AreEqual(enIntellisenseResultType.Selectable, result[0].Type);
            Assert.AreEqual("field1 Desc", result[0].Message);
            Assert.AreEqual(enIntellisenseResultType.Selectable, result[2].Type);
            Assert.AreEqual("field2 Desc", result[2].Message);

            var name = parser.ValidateName("field1", "Scalar");

            Assert.IsNull(name);

            name = parser.ValidateName("[[recName1]]", "Recordset");

            Assert.IsNotNull(name);
        }
        static IDataListVerifyPart AddField(Dev2DataLanguageParser dataLanguageParser, Dictionary <IDataListVerifyPart, string> unique, IDataListVerifyPart verifyPart, string[] fieldList, bool recAdded, string item)
        {
            // If it's a field to a record set
            var intellisenseResult = dataLanguageParser.ValidateName(item, "");

            if (intellisenseResult == null && recAdded)
            {
                verifyPart = IntellisenseFactory.CreateDataListValidationRecordsetPart(
                    RemoveRecordSetBrace(fieldList.ElementAt(0)), item);
                AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
            }

            return(verifyPart);
        }
 static void AddField(Dev2DataLanguageParser dataLanguageParser, Dictionary <IDataListVerifyPart, string> unique, ref IDataListVerifyPart verifyPart, ref string fullyFormattedStringValue, ref bool recAdded, string item)
 {
     if (item.Contains("("))
     {
         fullyFormattedStringValue = RemoveRecordSetBrace(item);
         var intellisenseResult = dataLanguageParser.ValidateName(fullyFormattedStringValue, "");
         if (intellisenseResult == null)
         {
             recAdded   = true;
             verifyPart =
                 IntellisenseFactory.CreateDataListValidationRecordsetPart(fullyFormattedStringValue,
                                                                           String.Empty);
             AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
         }
     }
 }
Exemple #10
0
        void ValidateName(Dev2DataLanguageParser parser, string recName)
        {
            var intellisenseResult = parser.ValidateName(recName, "Recordset");

            if (intellisenseResult != null)
            {
                SetError(intellisenseResult.Message);
            }
            else
            {
                if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                    !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                    !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                    !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                {
                    RemoveError();
                }
            }
        }
Exemple #11
0
        private string ValidateName(string name, Dev2DataLanguageParser parser, string fieldName)
        {
            var intellisenseResult = parser.ValidateName(fieldName, "Recordset field");

            if (intellisenseResult != null)
            {
                SetError(intellisenseResult.Message);
            }
            else
            {
                if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                    !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                    !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                    !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                {
                    RemoveError();
                    name = fieldName;
                }
            }

            return(name);
        }
Exemple #12
0
        public override string ValidateName(string name)
        {
            var parser = new Dev2DataLanguageParser();

            if (!string.IsNullOrEmpty(name))
            {
                name = DataListUtil.RemoveRecordsetBracketsFromValue(name);

                if (!string.IsNullOrEmpty(name))
                {
                    var intellisenseResult = parser.ValidateName(name, "Recordset");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                    else
                    {
                        ConditionallyRemoveError();
                    }
                }
            }
            return(name);
        }
        public override string ValidateName(string name)
        {
            Dev2DataLanguageParser parser = new Dev2DataLanguageParser();

            if (!string.IsNullOrEmpty(name))
            {
                var intellisenseResult = parser.ValidateName(name, "Scalar");
                if (intellisenseResult != null)
                {
                    SetError(intellisenseResult.Message);
                }
                else
                {
                    if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                        !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                        !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                        !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                    {
                        RemoveError();
                    }
                }
            }
            return(name);
        }
        private static bool IsJSonInputValid(string dataPartFieldData, Dev2DataLanguageParser dataLanguageParser)
        {
            var isValid            = false;
            var removeBrace        = dataPartFieldData.Contains("()") ? dataPartFieldData.Replace("()", "") : RemoveRecordSetBrace(dataPartFieldData);
            var replaceAtSign      = removeBrace.Replace("@", "");
            var intellisenseResult = dataLanguageParser.ValidateName(string.IsNullOrEmpty(replaceAtSign) ? dataPartFieldData : replaceAtSign, "");

            if (intellisenseResult == null)
            {
                isValid = true;
            }
            else
            {
                var indexOfAtSign = dataPartFieldData.IndexOf("@", StringComparison.Ordinal);
                if (dataPartFieldData.Contains("@") && (indexOfAtSign == 0) && (indexOfAtSign + 1 >= dataPartFieldData.Length))
                {
                    if (!intellisenseResult.Message.Contains("invalid char"))
                    {
                        if (char.IsLetter(dataPartFieldData[1]))
                        {
                            isValid = true;
                        }
                    }
                }

                if (dataPartFieldData.Contains('.'))
                {
                    var fields = dataPartFieldData.Replace("@", "").Split('.');
                    if (fields.All(p => !string.IsNullOrEmpty(p) && char.IsLetter(p[0])))
                    {
                        isValid = true;
                    }
                }
            }
            return(isValid);
        }
        /// <summary>
        /// Determines whether [name is valid].
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns>
        ///   <c>true</c> if [name is valid]; otherwise, <c>false</c>.
        /// </returns>
        public override string ValidateName(string name)
        {
            Dev2DataLanguageParser parser = new Dev2DataLanguageParser();

            if (!string.IsNullOrEmpty(name))
            {
                if (IsRecordset)
                {
                    name = DataListUtil.RemoveRecordsetBracketsFromValue(name);
                }
                else if (IsField)
                {
                    name = DataListUtil.ExtractFieldNameFromValue(name);
                }

                if (!string.IsNullOrEmpty(name))
                {
                    var intellisenseResult = parser.ValidateName(name, IsRecordset ? "Recordset" : "Variable");
                    if (intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                    else
                    {
                        if (!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                        {
                            RemoveError();
                        }
                    }
                }
            }
            return(name);
        }
     public static void BuildDataPart(string dataPartFieldData, Dictionary<IDataListVerifyPart, string> unique)
       {
           Dev2DataLanguageParser dataLanguageParser = new Dev2DataLanguageParser();

           dataPartFieldData = DataListUtil.StripBracketsFromValue(dataPartFieldData);
           IDataListVerifyPart verifyPart;
           string fullyFormattedStringValue;
           string[] fieldList = dataPartFieldData.Split('.');
           if (fieldList.Count() > 1 && !String.IsNullOrEmpty(fieldList[0]))
           {
               // If it's a RecordSet Containing a field
               bool recAdded = false;

               foreach (var item in fieldList)
               {
                   if (item.EndsWith(")") && item == fieldList[0])
                   {
                       if (item.Contains("("))
                       {
                           fullyFormattedStringValue = RemoveRecordSetBrace(item);
                           var intellisenseResult = dataLanguageParser.ValidateName(fullyFormattedStringValue, "");
                           if (intellisenseResult == null)
                           {


                               recAdded = true;
                               verifyPart =
                                    IntellisenseFactory.CreateDataListValidationRecordsetPart(fullyFormattedStringValue,
                                        String.Empty);
                               AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                           }

                       }
                   }
                   else if (item == fieldList[1] && !(item.EndsWith(")") && item.Contains(")")))
                   {
                       // If it's a field to a record set
                       var intellisenseResult = dataLanguageParser.ValidateName(item, "");
                       if (intellisenseResult == null && recAdded)
                       {
                           verifyPart = IntellisenseFactory.CreateDataListValidationRecordsetPart(
                                   RemoveRecordSetBrace(fieldList.ElementAt(0)), item);
                           AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                       }
                   }
                   else
                   {
                       break;
                   }
               }
           }
           else if (fieldList.Count() == 1 && !String.IsNullOrEmpty(fieldList[0]))
           {
               // If the workflow field is simply a scalar or a record set without a child
               if (dataPartFieldData.EndsWith(")") && dataPartFieldData == fieldList[0])
               {
                   if (dataPartFieldData.Contains("("))
                   {
                       fullyFormattedStringValue = RemoveRecordSetBrace(fieldList[0]);
                       var intellisenseResult = dataLanguageParser.ValidateName(fullyFormattedStringValue, "");
                       if (intellisenseResult == null)
                       {
                           verifyPart = IntellisenseFactory.CreateDataListValidationRecordsetPart(fullyFormattedStringValue, String.Empty);
                           AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                       }
                   }
               }
               else
               {
                   var intellisenseResult = dataLanguageParser.ValidateName(dataPartFieldData, "");
                   if (intellisenseResult == null)
                   {
                       verifyPart = IntellisenseFactory.CreateDataListValidationScalarPart(RemoveRecordSetBrace(dataPartFieldData));
                       AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                   }
               }
           }
       }
        /// <summary>
        /// Determines whether [name is valid].
        /// </summary>
        /// <param name="name">The name.</param>
        /// <returns>
        ///   <c>true</c> if [name is valid]; otherwise, <c>false</c>.
        /// </returns>
        public override string ValidateName(string name)
        {
            Dev2DataLanguageParser parser = new Dev2DataLanguageParser();
            if(!string.IsNullOrEmpty(name))
            {
                if(IsRecordset)
                {
                    name = DataListUtil.RemoveRecordsetBracketsFromValue(name);
                }
                else if(IsField)
                {
                    name = DataListUtil.ExtractFieldNameFromValue(name);
                }

                if(!string.IsNullOrEmpty(name))
                {
                    var intellisenseResult = parser.ValidateName(name, IsRecordset ? "Recordset" : "Variable");
                    if(intellisenseResult != null)
                    {
                        SetError(intellisenseResult.Message);
                    }
                    else
                    {
                        if(!string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateValue, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateVariable, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageDuplicateRecordset, StringComparison.InvariantCulture) &&
                            !string.Equals(ErrorMessage, StringResources.ErrorMessageEmptyRecordSet, StringComparison.InvariantCulture))
                        {
                            RemoveError();
                        }
                    }
                }
            }
            return name;
        }
 public void Dev2DataLanguageParser_ValidateName_NotLatinCharacter_ShowMessageBox_TextMadeEmpty()
 {
     //------------Setup for test--------------------------          
     var dev2LanuageParser = new Dev2DataLanguageParser();
     const string Text = "?????????";
     //------------Execute Test---------------------------
     var intellisenseResult = dev2LanuageParser.ValidateName(Text, "");
     //------------Assert Results-------------------------
     Assert.IsNotNull(intellisenseResult);
     Assert.AreEqual(enIntellisenseErrorCode.SyntaxError, intellisenseResult.ErrorCode);
 }
Exemple #19
0
        public IIntellisenseResult ValidateName(string name, string displayName)
        {
            var parser = new Dev2DataLanguageParser();

            return(parser.ValidateName(name, displayName));
        }
 public void Dev2DataLanguageParser_ValidateName_NameIsEmpty_Null()
 {
     //------------Setup for test--------------------------
     var dev2LanuageParser = new Dev2DataLanguageParser();
     //------------Execute Test---------------------------
     var res = dev2LanuageParser.ValidateName("", "");
     //------------Assert Results-------------------------
     Assert.IsNull(res);
 }
        public static void BuildDataPart(string dataPartFieldData, Dictionary <IDataListVerifyPart, string> unique)
        {
            Dev2DataLanguageParser dataLanguageParser = new Dev2DataLanguageParser();

            dataPartFieldData = DataListUtil.StripBracketsFromValue(dataPartFieldData);
            IDataListVerifyPart verifyPart;
            string fullyFormattedStringValue;

            string[] fieldList = dataPartFieldData.Split('.');
            if (fieldList.Count() > 1 && !String.IsNullOrEmpty(fieldList[0]))
            {
                // If it's a RecordSet Containing a field
                bool recAdded = false;

                foreach (var item in fieldList)
                {
                    if (item.EndsWith(")") && item == fieldList[0])
                    {
                        if (item.Contains("("))
                        {
                            fullyFormattedStringValue = RemoveRecordSetBrace(item);
                            var intellisenseResult = dataLanguageParser.ValidateName(fullyFormattedStringValue, "");
                            if (intellisenseResult == null)
                            {
                                recAdded   = true;
                                verifyPart =
                                    IntellisenseFactory.CreateDataListValidationRecordsetPart(fullyFormattedStringValue,
                                                                                              String.Empty);
                                AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                            }
                        }
                    }
                    else if (item == fieldList[1] && !(item.EndsWith(")") && item.Contains(")")))
                    {
                        // If it's a field to a record set
                        var intellisenseResult = dataLanguageParser.ValidateName(item, "");
                        if (intellisenseResult == null && recAdded)
                        {
                            verifyPart = IntellisenseFactory.CreateDataListValidationRecordsetPart(
                                RemoveRecordSetBrace(fieldList.ElementAt(0)), item);
                            AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                        }
                    }
                    else
                    {
                        break;
                    }
                }
            }
            else if (fieldList.Count() == 1 && !String.IsNullOrEmpty(fieldList[0]))
            {
                // If the workflow field is simply a scalar or a record set without a child
                if (dataPartFieldData.EndsWith(")") && dataPartFieldData == fieldList[0])
                {
                    if (dataPartFieldData.Contains("("))
                    {
                        fullyFormattedStringValue = RemoveRecordSetBrace(fieldList[0]);
                        var intellisenseResult = dataLanguageParser.ValidateName(fullyFormattedStringValue, "");
                        if (intellisenseResult == null)
                        {
                            verifyPart = IntellisenseFactory.CreateDataListValidationRecordsetPart(fullyFormattedStringValue, String.Empty);
                            AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                        }
                    }
                }
                else
                {
                    var intellisenseResult = dataLanguageParser.ValidateName(dataPartFieldData, "");
                    if (intellisenseResult == null)
                    {
                        verifyPart = IntellisenseFactory.CreateDataListValidationScalarPart(RemoveRecordSetBrace(dataPartFieldData));
                        AddDataVerifyPart(verifyPart, verifyPart.DisplayValue, unique);
                    }
                }
            }
        }