Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Show currently logged on user account on screen?

Featured Replies

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?

Create an unstored calculation field with the contents:

Get(AccountName)

Place that field wherever you want to see it.

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.

I wonder if there are any advantages/disadvantages to using globals vs. unstored calcs. for this purpose?

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.

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.

Have you used this table with XSLT in CWP? If yes? Are you happy with the results?

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.