Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7111 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I would like to show the currently-logged on user account name on the screen to my users so they know whose session they might sit down in front of. Any idea what script to call on for this?

Posted

Create an unstored calculation field with the contents:

Get(AccountName)

Place that field wherever you want to see it.

Posted

I've done a similar thing although differently.

I created a table called "Session". In this table I have created a bunch of GLOBAL fields that store information gathered during the initial login. This information is valid for the duration of the user's session. One of the fields is called Account_Name and it is populated via a startup script with a simple:

SetField(Session::Account_Name; Get(AccountName))

Then I display the global Session::Account_Name field whenever and wherever I need it.

Posted

I suppose that one could argue that with an unstored calculation it would be continually calculating the result as the user wanders around whereas the global is just storing the data. However, maybe the unstored calculation just keeps the same value (not continually recalculating) because nothing is changing other than the vantage point.

Probably one method is more efficient than the other. I really don't know. Maybe some of the regulars would care to weigh-in.

Posted

I think the benefit of a global here over an unstored calc is that the global is applicable to the entire database, the unstored calc is calculated for each record. In a large database that could cause performance problems.

This topic is 7111 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.