FlowDesigner javascript:gs.getUserID() in IF logic not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:16 PM
Hi All,
Flow Designer javascript:gs.getUserID() in IF logic not working
Please refer the attachment.
Can please help me on that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:20 PM
Hi @Siva82
The reason why the gs.getUserID() in IF logic is not working in the Flow Designer image you sent is because the IF statement is checking for the value of the variable "userID". However, the variable "userID" is not defined in the Flow Designer image.
To fix this, you need to define the variable "userID" in the Flow Designer image. You can do this by adding the following code to the Flow Designer image:
var userID = gs.getUserID();
Once you have defined the variable "userID", you can use it in the IF statement. The IF statement will then check for the value of the variable "userID" and execute the code in the THEN clause if the value of the variable "userID" is equal to the value you specify in the IF statement.
For example, you could use the following IF statement to check if the current user is the owner of the incident:
if (userID == incident.owner) { // Do something }
If the current user is the owner of the incident, the code in the THEN clause will be executed. If the current user is not the owner of the incident, the code in the THEN clause will not be executed.
Please mark the answer as correct solution and helpful if helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:29 PM
Hi @nameisnani
Thank you for quick response,
There is no script option in the IF logic.How to use code which is provided
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 09:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:27 PM