Topic: public variable

how i can set a public variable
for example x := application.User.Username;

and i request the x at any time i want

Re: public variable

Use this script.

Var
x : string;
Begin
x := application.User.Username;
End.

No procedure or function required...

Re: public variable

Hi,
You don't actually need to do anything - all of the log-in / security related fields are already, in effect, public variables, in that they can be addressed directly anywhere in your script and used on any form;  no separate declaration is required.
This is valid for all of the following:
Application.User.Username;
Application.User.Email;
Application.User.First_name;
Application.User.Last_name;
Application.User.Role;
Application.User.RoleId;
Application.User.is_admin;
Application.User.is_active;
Application.User.is_logged;
Application.User.Last_login;
Application.User.Date_joined;
Derek.