Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Jen D Contributor.
Contributor.
246 views

Custom button and ActionCanExecute function not working

Jump to solution

Hello ALM community - I need help with ALM 12.53

I have read through other posts that seemed to be similar in nature, but the solutions did not solve my problem. After trying various ways to capture the action name, I stripped the function to nothing but a msgbox - and still nothing

The button in Requirements toolbutton editor is as follows

Caption: Requirements_Command1

Hint: Requirements_Action1

Action Name: Requirements_Action1

 

I have the following code in ActionCanExecute

Function ActionCanExecute(ActionName)
         msgbox "hi"

End Function

Nothing happens on clicking the button. The button does activate and I can click it and I get the hover text but no msgbox appears ever.

Any ideas what is going on?

Thank you

0 Likes
1 Solution

Accepted Solutions
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom button and ActionCanExecute function not working

Jump to solution

If you can't see the template workflow, then no template project is connected. So you must have some inconsistencies in your workflow that cause the error.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
4 Replies
Highlighted
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom button and ActionCanExecute function not working

Jump to solution

Is your project connected to a template project? In that case, try moving your code to Template_ActionCanExecute.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Account_Closed
Not applicable

Re: Custom button and ActionCanExecute function not working

Jump to solution

Thank you Jan for taking time to help me solve this

I tried to create a function Template_ActionCanExecute but the prefix "template" is not allowed. I think there is a template but maybe I can't see it? I assume there would be another tree in the workflow sidebar that says something like "template workflow". I only see "wrokflow scripts"->"Project Scripts"->module tree

How can I access the template code? I can request permission to it but need to know what to ask for.

thanks

0 Likes
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: Custom button and ActionCanExecute function not working

Jump to solution

If you can't see the template workflow, then no template project is connected. So you must have some inconsistencies in your workflow that cause the error.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Jen D Contributor.
Contributor.

Re: Custom button and ActionCanExecute function not working

Jump to solution

Thank you Jan

I went through every module carefully and HEY- I found another ActionCanExecute function buried in the defect workflow

I didn't put it there, and it has code that I didn't write, so I guess it came across when the project was created (I am the first admin to the project.)

Very frustrating but at least it is solved now

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.