diff --git a/PROMS/DataLoader/Procedures.cs b/PROMS/DataLoader/Procedures.cs index 5ae109f0..b6b77ce9 100644 --- a/PROMS/DataLoader/Procedures.cs +++ b/PROMS/DataLoader/Procedures.cs @@ -240,9 +240,9 @@ namespace DataLoader // will get read in the section code to get the section title. string sequence = drw["CSequence"].ToString().PadRight(10); string step = drw["CStep"].ToString(); - if (step[1]=='~' && sequence[1]==' ') break; - - SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver, activeFormat, addpart ? cont : null); + if (step[1]=='~' && sequence[1]==' ') break; + bool hasSubSects = (sequence[5] != ' ' && sequence[5] != '0'); + SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, hasSubSects, pth, docver, activeFormat, addpart ? cont : null); addpart = false; // if no children, add first child (cont) //if (addpart)