Metastorm link button in form segment
Metastorm link button in form segment
I was encountered in problem where I need a Link button in form segment but unfortunately it does not provide by Metastorm.
There is an option available in Label where you can define URL in property and it converts to hyperlink. But it will be static and you cannot change it. Another problem is that it opened in new page.
So, Solution is
1) Add label in your form segment and set caption as below which will load function "FormSegment_OnLoad" when form segment load.
window.attachEvent("onload", FormSegment\_OnLoad);
2) Add another label in your form segment which you want to make as link ex.: lblParentRequestNo and set URL property as below. This function "OpenParentRequestNo" will be usefull for any code you want to execute on hyperlink click.
javascript: OpenParentRequestNo();
3) Add below function in your client script library. And set your label target property to "_self". This is important otherwise it will open form in blank page and not able to execute your function "OpenParentRequestNo"
function FormSegment_OnLoad()
{
try
{
document.getElementById('lblParentRequestNo').childNodes[0].target = "_self";
}
catch(ex) {alert(ex.description);}
}
4) Add your function "OpenParentRequestNo" code here, in my case I am clicking on button which open existing folder.
function OpenParentRequestNo()
{
try
{
document.getElementById('cmdOpenParent').click();
}
catch(ex) {alert(ex.description);}
}
That's all...
Hope this helps... someone…
Comments
-
You can also just change a label to be calculated instead of static text. (Go to the label's properties -> Caption type)
Using this you can make any URL dynamic without the need to call other scrits.
... also if you really want it to look like a button then you can add your own CSS to the <a href... to make it look like a button.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories