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
Absent Member.. AndreFischer Absent Member..
Absent Member..
386 views

How can the script for a Workflow Button get a selected Resource

Jump to solution

I'm trying to determine how the script created for a Button on the Test Resource page can identify which Resource the user has selected.

 

The script for the Button click event has been added in the Common script / ActionCanExecute.  However, the action needs to be applied to the Resouce that the user has selected.  I've tried using Resource_Fields("RSC_ID").value to get the Resouce Id, but it returns blanks.

 

How can the Resource Id of the selected Resource be obtained?

 

 

Thanks....

 

 

Andre Fischer.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Hanuman_U Absent Member.
Absent Member.

Re: How can the script for a Workflow Button get a selected Resource

Jump to solution

Hello Andre,

 

As Trudy said ,  create a global varible in Common Script section of the workflow. And assingn Resource_Fields("RSC_ID").value to the variable in Resource_MoveTO function.

Replace  Resource_Fields("RSC_ID").value with global varible name in  ActionCanExecute.

 

 


Regards,
Hanumanth
0 Likes
3 Replies
Absent Member.. Trudy Claspill Absent Member..
Absent Member..

Re: How can the script for a Workflow Button get a selected Resource

Jump to solution
I think what you will have to do is look at customizing the Resource_MoveTo workflow to save off the ID to a global variable and then code you button workflow to reference that global variable. I recall reading about this in the Admin Guide, but I don't have the exact reference at my fingertips.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Highlighted
Hanuman_U Absent Member.
Absent Member.

Re: How can the script for a Workflow Button get a selected Resource

Jump to solution

Hello Andre,

 

As Trudy said ,  create a global varible in Common Script section of the workflow. And assingn Resource_Fields("RSC_ID").value to the variable in Resource_MoveTO function.

Replace  Resource_Fields("RSC_ID").value with global varible name in  ActionCanExecute.

 

 


Regards,
Hanumanth
0 Likes
Bastian-31 Contributor.
Contributor.

Re: How can the script for a Workflow Button get a selected Resource

Jump to solution

hello, 

Can you pls send me the code for moving a test resource to other folder? Thx

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.