Same configurator / button code, different results

We have 4 product configurators. They basically look & feel the same.

Sales enter a customer, then chooses a configuration. this then generates the ‘customer code number’ and this is then read off a look-up table.
We have a character box to manually enter in the configuraiton number.
We have 2 buttons on the configurator screen; one will increment up this number, the other one will increment it down.

On the 4 configurators we have, it work. but on the 5th one, the one I’m building, I can see the number increase or decrease, but nothing changes.

I can, however, enter in the desired number, and it will update itself. SO, I’m at a loss as to why it works on one, but not the other…

Button code:
if (Inputs.DE_BuildVer.Value < System.Convert.ToDecimal(Inputs.CH_NumOfBuilds.Value))
Inputs.DE_BuildVer.Value = (Inputs.DE_BuildVer.Value + 1);

if (Inputs.DE_BuildVer.Value > 1)
Inputs.DE_BuildVer.Value = (Inputs.DE_BuildVer.Value - 1);

The first line of the customer code (On field changed):
Inputs.CH_NumOfBuilds.Value = PCLookUp.DataLookup(“INF4500_CUST_BUILD_VERSIONS”, “BuildVersions”,Inputs.CH_CustCode.Value);
Inputs.CH_BuildCode.Value = “INF4500-” + Inputs.CH_CustCode.Value + “-” + Inputs.DE_BuildVer.Value;

I then go on to fill in about 80 lines of “Inputs.XXXValue = PC Lookup…” from 2 different tables

The DE_BuildVer box is either manually entered, or driven by the next / previous buttons
Its first line of code (On Field Changed):
if ((Inputs.DE_BuildVer.Value < 1)||(Inputs.DE_BuildVer.Value >System.Convert.ToDecimal(Inputs.CH_NumOfBuilds.Value)))
Inputs.DE_BuildVer.Value = 1;
Inputs.CH_BuildCode.Value = “INF4500-” + Inputs.CH_CustCode.Value + “-” + Inputs.DE_BuildVer.Value;

I then go on to fill in (Update) the 80 lines of code (the code block is the same as CH_CustCode, except for this one line)

As I said, this works find in 4 other configurators, not the 5th one. This works (albeit slow) when I manually type in a number, but not with the next / previous button (I can see the number increase or decrease, but it just doesn’t seem to trigger the next build, to get the next line of look-up table data…)

Its there a limit to how many lines I should have in my code?
Does it time out after a while?
Is there a way to see where it’s pausing? Or what event is slowing it down?


I may not be following exactly what the issue is. Use of PC Lookup tables can give weird results (one of many reasons I stay away from them). There are times they don’t work (return a value) but don’t give an error. So your increment code might be working but the code that works with the PC lookup tables may be failing silently. Make sure that ALL cells have a value in them when initially populating a PC Lookup table. For example I will put ZZZ in a column and treat it as the “empty” value. If a column is left blank and it is the last column or a group of columns are the last columns and are blank that cell/column will not be created so it will not return anything.

Yeah, what Jim said. PCLookup tables are…um…a bit challenging. If you’re using the same counter, you can us the PCConfig table or a UD table and just do look ups that way.

I’d be fine if they were outlawed…

1 Like