- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2021 06:47 AM
Hi All,
I have a requirement to include hyperlink in check box variable. But by default we does not have any "Annotation" tab in check box variable. How do we achieve this by any chance. Please help me to get a solution on the same.
In the highlighted area hyperlink should come named as "Link" example: I Acknowledge Link(https://google.com) the content.
Solved! Go to Solution.
- Labels:
-
Script Debugger
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 06:25 AM
You have to do the validation inside the widget only .
You have to use the ng-model for it and then use client script(widget to set the value to some variable in your form)
HTML
<div>
<input type="checkbox" ng-change = 'c.checkboxcheck()'ng-model='data.check'>I Acknowledge <a href="https://www.google.com" target="_blank" rel="noopener">Link Opens in New Tab</a>Test Record <a href="https://www.w3schools.com" target="_blank" rel="noopener">Link Opens</a><br>
</div>
Client Code
//make sure you add $scope to function
var g_form = $scope.page.g_form;
c.checkboxcheck = function(){
g_form.setValue('variable name',c.data.check);
}
Now you can check this in your client script
var costcenter = g_form.getValue('cost_center');
alert(costcenter);
var ack = g_form.getValue('variable name');
alert(ack);
if(costcenter=='d9d0a971c0a80a641c20b13d99a48576' && !ack ){
g_form.addErrorMessage('please enter acknowledgement');
return false;
}
else{
return true;
}
I haven't tested the above but this is the way you have to follow, let me know if you have any questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 07:30 AM
Can you share your code what you implemented ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2021 09:32 PM
Hi Pranav,
Please find below code :
HTML :
<div>
<input type="checkbox" ng-change = 'c.checkboxcheck()'ng-model='data.check'>I Acknowledge <a href="https://www.google.com" target="_blank" rel="noopener">Link Opens in New Tab</a>Test Record <a href="https://www.w3schools.com" target="_blank" rel="noopener">Link Opens</a><br>
</div>
Client Controller :
function($scope) {
var c = this;
var g_form = $scope.page.g_form;
c.checkboxcheck = function(){
g_form.setValue('your_text',c.data.check);
}
}
Onsubmit client script:
var costcenter = g_form.getValue('cost_center');
alert(costcenter);
var ack = g_form.getValue('i_acknowledge');
alert(ack);
if(costcenter=='d9d0a971c0a80a641c20b13d99a48576' && ack==''){
g_form.addErrorMessage('please enter acknowledgement');
return false;
}
else{
return true;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2021 05:22 AM
I am not understanding where you are getting the error, please ping me on pranavbhagat06@gmail.com and we can connect and discuss.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2021 05:16 AM
Hi Pranav,
Thanks for the code. Its working as expected. I missed to update correct variable name. That is the reason it does not thrown the error message. Its working fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2021 11:19 PM
Hi Pranav,
Its working fine as expected. But recently I am facing one issue on this. Once this request is submitted ,the field is not getting displayed in RITM table. But i have created separate UI policy to display in all three forms(catalog item,ritm,task). Do i need to change anything in my widget for this? please help me on this