Five Stars

Numeric Sequencing increments by 2 instead of 1

I have a numeric sequence which is incrementing by 2 instead of by 1.  In looking at the generated Java, Records should be numbering as 10000, 10001, 10002, etc.  Instead I'm getting 10001, 10003, 10005, etc.  I've used numeric.sequence before without issue.  I wonder if this is a side effect of my construction?

 

void generateElements(boolean isInnerJoin, row1Struct row1,
							Var__tXMLMap_1__Struct Var)
...
org.dom4j.Element loop_6 = null;
loop_6 = loop.addElement("ASSETNUM");
valueMap.put("loop_6", Numeric.sequence("s1", 10000, 1).toString());
if (valueMap.get("loop_6") != null) {
	routines.system.NestXMLTool.setText(loop_6,
	FormatterUtils.format(Numeric.sequence("s1", 10000, 1).toString(), null));
}
...

My tXMLMap looks like the following:

12-26-2017 11-01-23 PM.png

Am I using the numeric.sequence incorrectly in the tXMLMap component?

Overall flow looks like the following:

12-26-2017 11-01-23 PM.png

 

Any help is appreciated!

1 REPLY
Forteen Stars TRF
Forteen Stars

Re: Numeric Sequencing increments by 2 instead of 1

Hi,

Can't find where the method "generateElements" is used, but it seems that for each call, Numeric.sequence is called twice:

org.dom4j.Element loop_6 = null;
loop_6 = loop.addElement("ASSETNUM");
valueMap.put("loop_6", Numeric.sequence("s1", 10000, 1).toString()); // + 1 "s1" sequence or "s1" initialized to 1
if (valueMap.get("loop_6") != null) { // so "loop_6" is not null
routines.system.NestXMLTool.setText(loop_6,
FormatterUtils.format(Numeric.sequence("s1", 10000, 1).toString(), null)); // + 1 to "s1" sequence
}

May the cause of your problem is here.


TRF