Kinetic Configurator - Copied Controls/Inputs

Working in (Learning) Kinetic Product Configurator.

The equipment I’m attempting to build into the configurator has some repetitive controls. Basically, I have (15) parts that are part of the top level assembly, and the user can configure each one with various drop downs, radio buttons, etc… So, the same controls/options… they just have to choose their options (up to) 15 times depending on how many of these parts they want included in the main assembly.

In the designer (Kinetic/App Studio) I built the controls for the first part.

I then copy/pasted them into the designer and then went back in to edit their IDs so they corresponded with the second part instead of the first.

When I did this, I noticed that the “Dynamic Lists” were still pinned to the original control ID. So, I found if I toggled the Data Source for the Dynamic List from “BAQ” to “Predefined List” and back to “BAQ”, the control ID would update to the new one. Great!

I then started working on the OnChange events (CSharp). What I quickly discovered is that the OnChange events of these copied controls didn’t work. After scrutinizing the C# for awhile, which seemed perfectly fine… I made a set of all new controls, from scratch with different IDs, and the OnChange events WOULD fire.

What I found was the OnChange events on my pasted controls were still tied to the original copied controls! So, if I changed those original controls for the first part, all the change events would fire and work. But changing the value of a pasted control did nothing. It was waiting for the copied control to change.

EpiCare case entered on that one… Copy/Pasting controls (although possible) appears to retain behind the scene connections to the original copied control/events.

So, I then went in and deleted all but my original controls… hoping to wipe the slate clean.

I then started rebuilding the subsequent controls manually one by one. (there are 135 of them, so this is a huge drag when copy/paste seemed like a great tool).

Having my next set of controls ready for my part (2), I wanted to test them before continuing to finish the 135 controls. The problem is, I had used the same names (ID’s) for these controls as I had used for the ones I had previously deleted.

So, it turns out, deleting the control (comboboxes, radio buttons, etc.) does NOT delete the events originally tied to them… which were wrongly tied to different controls and not working properly. So, even though I built these manually, because I used the same names/ID’s, they re-connected themselves to the original (bad) events.

I looked in the events in App Studio and all of the events for those deleted controls are still lingering there. OnChange events, OnInit events, etc.

I suppose the solution here is to rebuild each control manually, AND change my control naming schema and get clean events tied to new controls… No, big problem there. But, there doesn’t seem to be any way to delete the old, BAD, events. I can right-click on them and delete, but if I close the designer and come back in, they come back.

Does anyone know of any way to purge these events which are no longer tied to controls? This just leaves a lot of bloat in the background that I’d like to clean up.

EpiCare case also entered for that, as well… but hoping someone on here may have already come across this issue.

6 Likes

I received a semi-workable workaround from EpiCare to get around “issue 2” above.

If you delete the input and then PUBLISH the configurator it looks like that will remove the events from the input if it gets added again (using the same name/ID).

STEPS:
Delete the input or inputs you need to correct.
Publish the configurator.
Unapprove the configurator in configurator entry and launch designer again.
When you add the inputs back they should no longer have the dynamic list or on field change events.

I did test… deleting the pasted fields, publishing, then manually adding them back, and it was successful in updating the events (they were blank when i went in to set them up). Previously, they had already been populated with the previous C# code.

NOTE: This method does not DELETE/REMOVE the events of deleted controls. They’re still there. But they’re now empty (the pre-existing C# code is gone). So, still some bloat, but since the events are then empty, it shouldn’t actually be trying to do anything (run any C# code it doesn’t need to).

~~ * ~~

I then tested this method against my original issue of copying/pasting controls:

  1. I copy/pasted a set of controls.

  2. I renamed them (gave them new IDs). Per the original case, the Dynamic List Data Source was still pointed at the original copied control.

  3. I toggled the Data Source from “BAQ” to “Predefined List”… then back to “BAQ”. This updated the Data Source to the correct input name.

  4. I then PUBLISHED and closed designer.

  5. I then unapproved and went back into designer.

  6. I set up the OnChange events for the pasted controls, and they DID fire this time.

So… it appears “publishing” may force a some kind of hard refresh somewhere in the process behind the scenes and re-validating the inputs.

I did ANOTHER test, copy/pasting in another set of controls to see if I could eliminate step (3) above. After publishing, I went back into designer to see if the “publish” step would automatically update the Dynamic List Data Source, but unfortunately… my pasted controls for my Part (4) were still pointing to my copied Part (2) control names. So… “publishing” did not get me around having to do step (3).

2 Likes

Hey David,

Sorry to see that you’re dealing with this. I’ve had some similar issues with events and a few other functions in Application Studio that have been incredibly frustrating to deal with.

I was going to comment something similar to what support suggested above, by publishing the configurator after you finished your work/removed those links to the copied controls. We stumbled upon that solution when trying to update Dynamic Lists.

No matter how many times I changed the dynamic list from LIST 1 to LIST 2, the change would never hold the next time I opened the config designer no matter how many times I saved. It seems like saving doesn’t always push the latest version back to Kinetic until it’s published as well.

I’ve had a similar experience with it NOT being a serviceable workaround to a couple different issues. I also put in a case for the exact same problem you’re having and received the same response. As of right now, the only way I’ve been able to solve it is this;

I copy the entire configurator in Configurator Entry and basically clone it off of the original. When I’ve done that, it has a tendency to do one of two things:

  1. It will delete the broken/unlinked/unused UD methods, onChanged events, etc, and I will then be able to recreate them with the correct links and logic.
  2. It will keep everything and nothing has changed, requiring me to do the copy a second, third, fourth time until it works.

A caveat to the steps above is if you have configurator rules or document rules assigned to this, they might break or be erased too. So be sure to back them up in advance if you don’t want to lose that work as well.

I haven’t found a long term solution yet, but this is something that has worked for us if you want to give it a try. I know how frustrating it can be because you find yourself running in circles trying solutions that sometimes work but sometimes don’t.

Hopefully we can find a long term solution for this and sorry you’re dealing with this. Let me know if there’s anything else I might be able to help with, my fellow configurator disciple. :rofl:

4 Likes

I’ve been working with David and great detective work on his part for finding the problem.

Now for a bit of belly aching. I am working with several clients building kinetic configurators and I have yet to work with a client that a ticket hasn’t been opened. It has been quite frustrating that things I have done for years that don’t work. Not talking about doing undocumented magic things.

If you have a working classic configurator and don’t need to go full Kinetic yet I would recommend holding off for a bit longer before converting.

2 Likes

Hi @dcamlin,

We’re getting a similar issue here with some of our configurator options. I’ve found it a real pain to not be able to reuse the same ID as I’m trying to keep this structured. I’ll give the workarounds a try and see how I get on, thanks for posting these I’m sure they’ll be a huge help in for getting us up and running…

Another one similar to this that I’ve noticed is that when I renamed a Button which had “On Clicked” event and C# code assigned is that that code disappears (as if I’ve created a new button, when I’ve only in-fact renamed it). Luckily I noticed this and changing it back to the original name I was able to recover the code as it was still stored against that button ID. The issue I then came across was the button click wasn’t triggering the code to run in either a renamed ID or the original ID (awesome :upside_down_face:) I’ve had to create a new button and not change the ID name to get this working again. Hopefully this workaround you’ve suggested will also allow me to get a renamed button to work again.