I have strange use case where I have repeating rows that are numbered. The users want to delete the number of a row and the row number will remain blank. The subsequent rows will take up the numbering.
I have this working great with the following code:
xdMath:Max(../preceding-sibling::my:Step/my:Op-seq) + 1
(where "Step" is the group and "Op-seq" is the actual step number)
However, when we insert a step above a blank entry, it renumbers all the blank entries. So the next step was to put a conditional formula in that checks a box to see if the field should remain blank. This is code from MS:
concat(
substring(string(xdMath:Max(../preceding-sibling::my:Step/my:Op-seq) + 1), 1, (/my:SFields/my:Steps/my:Step/my:HeaderRow!='TRUE') * string-length(string(xdMath:Max(../preceding-sibling::my:Step/my:Op-seq) + 1))),
substring("", 1, (/my:SFields/my:Steps/my:Step/my:HeaderRow!='TRUE') * string-length("")))
In this case HeaderRow is the boolean that says if the header row should remain blank. But it still doesn't work. I'm not sure what the issue could possibly be. Any tips?