- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 05:34 AM
I want to a pass boolean(with its value) or flat as a parameter/argument to below function. this function will be triggered from multiple sources, so I want to have value of the flag like below, any help would be appreciated.
myFunction: function(tasksysid, tasksource, flag/boolean){
if value is A then add the value in rest call parameter , or if value is B then do not add it in the rest call parameter
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 05:50 AM
Hi @GD11 ,
You can directly declare the boolean from where you are triggering this funciton
For example
var flag = true;
var tasksysId = "something";
var tasksource = "nothing";
myFunction(tasksysId,tasksource,flag);
myFunction: function(tasksysid, tasksource, flag/boolean){
if(flag = true){
//Add true in rest call parameter
}
else{
//Add false in rest call parameter
}
}
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 05:50 AM
Hi @GD11 ,
You can directly declare the boolean from where you are triggering this funciton
For example
var flag = true;
var tasksysId = "something";
var tasksource = "nothing";
myFunction(tasksysId,tasksource,flag);
myFunction: function(tasksysid, tasksource, flag/boolean){
if(flag = true){
//Add true in rest call parameter
}
else{
//Add false in rest call parameter
}
}
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.