Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2023 07:19 AM
Hey all,
I'm currently making a topic that will create a ticket. Is there a way to check the logged in user's phone field and branch to different paths if the "phone" field is empty or populated?
Thank you!
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 12:14 PM
We have topic branch based on if a certain ID is populated or not. you can try the same
(function execute() {
var user = gs.getUserID();
var <Name> = new GlideRecord("sys_user");
<Name>.addQuery('sys_id', user);
<Name>.query();
if(<Name>.next()){
vaVars.acdID = acd.u_acd_id;
}
})()
Then in the branch decision, we added this and of coursed changed the code to the appropriate path
(function execute() {
if(vaVars.acdID != ""){
return false;
}
else{
return true;
}
})()
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2023 12:14 PM
We have topic branch based on if a certain ID is populated or not. you can try the same
(function execute() {
var user = gs.getUserID();
var <Name> = new GlideRecord("sys_user");
<Name>.addQuery('sys_id', user);
<Name>.query();
if(<Name>.next()){
vaVars.acdID = acd.u_acd_id;
}
})()
Then in the branch decision, we added this and of coursed changed the code to the appropriate path
(function execute() {
if(vaVars.acdID != ""){
return false;
}
else{
return true;
}
})()