Highlighted
Vice Admiral
Vice Admiral
1087 views

RAD funtion gui()

Jump to solution

Hello All

 

Can someone explain the use fo function gui().  How it can be used in fc(calculation/validation) .

 

Regards

AA

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

It used to check whether the user is a real user or a background process. For example, if it's a background process, you do not want to ask it any question or show it any message.

View solution in original post

5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

It used to check whether the user is a real user or a background process. For example, if it's a background process, you do not want to ask it any question or show it any message.

View solution in original post

Highlighted
Vice Admiral
Vice Admiral

Hi  Jas1

 

 

Thanks for the response.  I also found the following :

gui() stands for graphical user interface. It returns true whenever you are logged in via a client. This includes the Windows client and all forms of the Web Client (including index.do and ess.do, contrary to the previous post. ess stands for employee self service and is a Web Client functionality)

It will return false whenever the record was added / updated by SCAuto, CIT, WS from the background.

The history of this function comes from times when we needed to distinguish between GUI and Text (MVS, Unix) clients, since the old style text clients were unable to display graphical objects.

Today, you can use gui() to check if a record was entered via a user or a background process. Or you can use the $G.bg flag to verify that a background process was doing the work.

0 Likes
Highlighted
Vice Admiral
Vice Admiral

I have the following validation in fc IM.open.incident

 

Validation: not null(subcategory in $file)

 

Add: gui() and itsm.app.name in $file~="USVD"

 

When I open a new incidnet, I am able to save the record without this validation being fired on the filed .

 

Regards

AA

 

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert
Run rad debugger and check the values of the field after you open the incident.
e.g. d subcategory in $file.
d itsm.app.name in $file
d gui()
0 Likes
Highlighted
Absent Member.
Absent Member.
Hi Arpit,

As Jas suggested and you already know gui() i s used to checked whether event is from GUI or in background .

It is simply set to true if using any client (win or web) , if you feels that it is not working then there should be some issue in placing the condition or logic in flow.

Since you are using capitals in validation of field name so check whether you have 'Case' as upper in this field's property using fd.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.