Kinetic Layer: Disable button while executing OnClick event

Hi all,

I’ve created a Kinetic Layer with a button that executes an event. Eventually it will fire an Epicor Function. The problem now is that the button doesn’t get in a ‘disabled’ state while it’s executing the event. This makes it possible for users to click the button multiple times, which will result in the function executing multiple times.

I tried using the Property-Set component, but i wasn’t able to make it work. I tried ReadOnly/Enabled/Disabled properties, but none of them worked. Maybe I used the wrong syntax.

Does anybody have an example of how to make this work?

Thanks in advance,

Brian

Have you tried using a Data Rule instead of an Event to disable it?

1 Like

Hello John,

Thank you for your reply.
I haven’t tried that yet. Should I enter an EpiBinding to the button in order to do that, or does that also work on Controls?

Not sure exactly what you are trying to accomplish, but I was thinking that you could add a field as a counter and when it is clicked the counter goes up 1 and that would trigger the Data Row Rule. Yes, it works on Controls. If you look at out of the box ones, you can see they use the RR to hide things like the attachment and new icons.

1 Like

I will give it a try, thanks!

You’re going to want to do a combination of rules and events.

  1. Bind your button to a field (it doesn’t have to be real DB column)

  1. Add a row-update widget to your button click event that sets something like TransView.Disable to true. Add a second one after your function call that will set it back to false.

  1. Create a rule that checks the state of TransView.Disable and disable the column you bound your button to if true. This will auto reverse if false

DisableFuncBtn

6 Likes

:slight_smile:

Thank you!

This worked for me :slight_smile:

Hmm in my rowupdate I dont get a columns item under parameters. It is just a blank screen.

Ha you can just add a 1 for the view.

However the rules section will not let me select a column that does not exist for the data rule part or even just type it in.

Do I have to add the CallEFXButton column to the view? I can type it in by disable columns in the rule but it just disappears.

Clickty the (+)

image

Yeah the rules will not let me add the CallEfxBtn to the last text box in the rule.
I can type it in but it vanishes. Even if I cut and past it from the button binding.

So close. I set the binding and added the rowupdate widget and can setup the rule except for the very last piece…

At that point it wont let you save, it says there is an error.

Is it because it is a view based on a BAQ, do I need to actually add a CallEfxBtn column?

Now Epicor just adding a set button state widget would be great.

Update: Eventually after typing a few times and hovering it gave me a little + to add the CallEfxBtn to the rule. It doesnt do anything. And Application studio says there is an error but when I click that it wont say what the error is.

Clarification: It says there is an error from the minute I start creating the ruke before I enter anything.

I finally got it to work.

The binding had to be to a real column in the BAQ, after that there was no issue.
I just made a boolean column called Calculated_CallEfxButton - set the default value to false and bound the button to that and used that column for the rule.

The fake field just does not seem to do anything if the DataView is a BAQ.

However there is always a but.

If I add a second button and use the same bindings and TransView fields it will not disable both. Very strange. Anyone else run into that problem?

It could just be Epicor. I notice that sometimes my TransView fields just vanish when I got to edit an application that has been in use for months with no issue.

I have tested in version 2025.1.5, and it functions effectively. Would you be able to share screenshots here?

I’m pretty sure I saw an option that exists now to just disable events on it until it finishes.

1 Like