diff --git a/FetchXmlBuilder/AppCode/TreeNodeHelper.cs b/FetchXmlBuilder/AppCode/TreeNodeHelper.cs index 9afae086..b402dcee 100644 --- a/FetchXmlBuilder/AppCode/TreeNodeHelper.cs +++ b/FetchXmlBuilder/AppCode/TreeNodeHelper.cs @@ -115,6 +115,10 @@ public static void SetNodeText(TreeNode node, FetchXmlBuilder fxb) { text += " pg:" + attributes["page"]; } + if (string.IsNullOrWhiteSpace(text)) + { + text = "fetch"; + } break; case "entity": case "link-entity": @@ -242,11 +246,11 @@ public static void SetNodeText(TreeNode node, FetchXmlBuilder fxb) } break; } + text = text.Trim(); if (FetchXmlBuilder.friendlyNames && !string.IsNullOrEmpty(text)) { text = text.Substring(0, 1).ToUpper() + text.Substring(1); } - text = text.Trim(); if (string.IsNullOrWhiteSpace(text)) { text = $"({node.Name})";