- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 10:02 PM
In the below script when condition is "No" I want to display a hyperlink on the catalog form so user can click on that link.
function onChange() {
if (g_form.getValue('variables.owner') == 'Yes')
{
//g_form.setDisplay('variables.message',true);
g_form.setDisplay('variables.Name',true);
g_form.setDisplay('variables.Type',true);
}
else if(g_form.getValue('variables.owner') == 'No')
{
g_form.setDisplay('variables.Name',false);
g_form.setDisplay('variables.Type',false);
var info = 'Link: <a href="catalog_home.do?sysparm_view=catalog_default">Link</a>';
//g_form.addInfoMessage(info);
//g_form.showFieldMsg('owner',info);
}
}
But i am not able to do that using showFieldMsge.. Can you please give some suggestions
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 10:46 PM
Try something like the following:
1) Create a UI page and lets call it Link. Your UI page just need to have the following on its html field:
<a href="catalog_home.do?sysparm_view=catalog_default">Link</a>
2) Create a catalog variable of type UI Page and reference your recently created UI page Link
And voila!
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 10:51 PM
Cool...... Thank you so much Berny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 02:22 AM
Hi Berny,
We will be able to do this using UI macros and formatters.
Which one is the best practice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2015 10:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2016 12:29 PM
It worked for me as well. But that field is being displayed in all the choice list options i select. What should i be doing to make it visible only for one choice list option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 03:25 AM
If you are creating a variable as per Berny's advise, then you should be able to hide it with g_form.