- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 02:30 PM
I have a variable "Phone" with a mask like "(000) 00000-0000".
It works perfectly on the Fulfiller screen, but now that we are migrating to Service Portal, I've noticed that you cannot use jQuery or DOM on Client Scripts.
Is it possible to put a phone mask on a variable so that it works on the Service Portal?
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2018 12:44 PM
Answering my own question from 2y ago: In order to use jQuery from client scripts on the service portal, you should use this.$ instead of $
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 03:00 PM
Hi Marcelo,
Did you try using the Variable type - Masked (In variable form) while declaring the variable? Because on an out of the box item in Service Portal the masked variable is converting the text to masked dots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2016 03:06 PM
Yes, I have tried that, but unfortunately that "Masked" type is only for passwords, not able to apply a specific mask (Phone).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 08:48 AM
Hi Marcelo,
This is a long shot but may be a good try as I am yet to try it. Just a suggestion as i haven't yet tried it. We can change the jquery plugin into a directive using a link like the one given below:-
Converting jQuery plugin to AngularJS Directive - Stack Overflow
and then apply the mask on to the field on the service portal front.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2016 01:45 PM
Unfortunately we cannot use "angular" directives as well on client scripts (only on widgets)