Multiple tab configurator and component error

good morning everyone!

I am working on a configurator that needs to have a huge number of inputs (400 +) and to help ligthen the loading of them when opening it, I decided to split them in multiple views (tabs).

What I decided to do was to create one section then copy it into the next tab, as the sections are copy of each ones but need to have unique identifiers so we can do calculations after the inputs are given by the user.

My first question arise from there: when i create elements for each tabs, i can preview the configurator just fine, but if i copy sections into an other tab, i have an error about index not been found and i can’t load the configurator.

it feels like the copy feature of component was meant to be done to copy element meant to be on the same page, and not to another page/tab.

my other question: I saw that inputs deleted from the designer stay in the system (like they don’t get deleted permenantly ?) is there a reason why ??

Right now the only solution i see is to take eache element of each tabs directly from the toolbox insted of copying sections to save time, does it sounds like a good solution??

is there any other people who had to face this issue ??

Classic or Kinetic?

Kinetic

I think I experienced similar issues to what you’re describing, though, I wasn’t copy/pasting across tabs… I entered cases on two issues below.

Copy/pasting controls:

First off, when you add a control from the toolbox, it will have a generic ID like below, using underscores in the ID:
image

However, I found that when pasting a control, the system provides a unique ID like below, using dashes in the ID:
image

This produces an error when trying to preview:
image

So… you HAVE to rename your controls after pasting… which is okay because best practice is to give it a meaningful ID anyway.

The key issue I found was, I was copying/pasting controls being used for Dynamic Lists. The pasted control retained the (Name) of the copied control (circled below):
image

So, even though I renamed the ā€œIDā€ of the new control, the Dynamic List was still pinned to the ID of the copied control.

At some point I found that if I changed the Data Source from BAQ to Predefined List… the control ID (Name) would update…

image

Then, if I toggled back to ā€œBAQā€, the new name would be correct:

image

DELETED CONTROL ISSUE:
While fumbling through the above issues, I had a deleted some controls and recreated them manually. The problem was, the ā€œeventsā€ tied to the original controls where not deleted. So, if I re-created the control with the same name (control ID) the ORIGINAL control events were still in the background.

For example, events like:

  • DynamicListExpression_controlID
  • controlID_ExecuteCsharp_ColumnChanged
  • controlID_OnInit

Even if I deleted the events manually, they would still conflict and come back.

Epicare did accept this as an issue and there are Development Tasks entered to correct it… but as of 11/19/2024, they’re still marked as ā€œAccepted - Not Yet Plannedā€. BUT… they did help me out here and clued me in on this tip/work-around:

If you delete controls… delete them and then PUBLISH the configurator and close the designer. After publishing, you can unapprove and then relaunch the designer again.

Apparently, when you publish, it sees it as a new draft to the existing layout and triggers the system to validate the inputs and data in the configurator. If it sees an input that is not there it drops the data and events.

This has proved successful, so if you run into issues… try publishing and see if that re-validating helps correct issues.

~*~

Anyway, again, I don’t know if this will correct your issue… but below is my ā€œworkflowā€ when copy/pasting controls in Kinetic Configurator:

If you delete anything… always delete… then publish… then unapprove and continue your designing.

If I copy/paste a set of controls… rename them (give them new IDs to get rid of the dashes epicor puts in by default).

In my case, I would go into the dynamic list settings of each pasted control and toggle them from BAQ to Predefined List and then back to BAQ (to refresh the control ID pinned to the list.

I would then Publish and close the designer.

I would then unapprove and go back into the designer.

I would then set up the OnChange events for the pasted controls and they would then fire successfully.

1 Like

Hey david thanks for the tip about the undeleted events ! Pretty useful. But my issue lies not in the naming of the inputs. These are changed to unique ids manually. It let me save the layout but when i open it in preview i get an error about key 2 not being found.

The fact that the publishing does some opƩrations while being done might be a clue on what to do. Maybe the publish actually connect some things .

Yeah, that was the important part of my rambling. Maybe publishing will help refresh things for you.


my layout looks like that , do you spot something that might not be right ??

also, here is the full error code i receive when trying to open in preview:

System.AggregateException: One or more errors occurred. (The given key '2' was not present in the dictionary.) ---> System.Collections.Generic.KeyNotFoundException: The given key '2' was not present in the dictionary. at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) <0x4532838 + 0x00040> in :0at Epicor.MetaFx.Wasm.WASMHelper.InitializePages (Newtonsoft.Json.Linq.JArray inputsArray, Newtonsoft.Json.Linq.JArray pcInputsArray) <0x45055a8 + 0x00286> in :0 at Epicor.MetaFx.Wasm.Dynamic.RunClass.InitializePagesMethod (System.String inputsArraydv, System.String pcInputsArraydv) <0x4519ab8 + 0x00042> in :0 --- End of inner exception stack trace --- ---> (Inner Exception #0) System.Collections.Generic.KeyNotFoundException: The given key '2' was not present in the dictionary. at System.Collections.Generic.Dictionary2[TKey,TValue].get_Item (TKey key) <0x4532838 + 0x00040> in :0at Epicor.MetaFx.Wasm.WASMHelper.InitializePages (Newtonsoft.Json.Linq.JArray inputsArray, Newtonsoft.Json.Linq.JArray pcInputsArray) <0x45055a8 + 0x00286> in :0 at Epicor.MetaFx.Wasm.Dynamic.RunClass.InitializePagesMethod (System.String inputsArraydv, System.String pcInputsArraydv) <0x4519ab8 + 0x00042> in :0 <---

Well, I’m still a novice with the configurator, so I don’t know/understand the limitations.

For example, I also wanted to have multiple pages, but wasn’t sure if… when a user completes one page, can they navigate back to it if they want to make changes? Or is Configurator designed to be progressive and page 2 builds on to entered information from page 1.

My configurator (which I haven’t had much time to work on lately) is still only one page… but I used a panel card stack instead of multiple ā€œpagesā€. So the user can click the tabs on the card stack to navigate around instead of moving from page to page.

I don’t have much to say on copying controls, particularly across pages and particularly in Kinetic. I will say though that in my experience, when it comes to navigating back and forth, that is up to you to decide since you control the logic.

The configurator (my experience which is much more in classic but a fair amount when it comes to uplifting) itself does not care BUT, if you have logic that builds on itself or is dependent on other selections first it is on you to manage that.

For that reason and since all of my multi-page configurations are based on previously entered information I actually set the page to read only when you load the next page and have a disclaimer on the page saying that. I also write most of mine to wipe out any field below the one you are modifying because in our case having someone change an earlier selection may cause things to need to be recalculated but if they do not change the field that triggers that then it will not, leading to issues.

Edit to add:
Wow, 400+ inputs on a single configurator, my most ā€˜complicated’ one is 155 inputs on 2 screens with the 2nd most being 139 on 3 screens.

1 Like