Skip to main content
Question

Best way to detect client type

  • June 19, 2026
  • 2 replies
  • 29 views

Forum|alt.badge.img+13

Hi,

We are currently transitioning a client from the Windows GUI to the Universal GUI.

In the existing situation, reports are generated via tsfreportmailer (gui_code), which is not supported in the Universal GUI. During the transition phase, both GUIs are active, so we need to support both approaches.

At the moment, we are experimenting with a process flow that calls Indicium for report generation.

What we would like to achieve is a where we can decide, based on the client type, whether to:

  • execute the exesting Windows-specific reporting task, or
  • execute a Universal/Indicium-based reporting task

So effectively, detect the active GUI..

For testing, we tried select app_name(); 

This returns:

  • Thinkwise Software Factory in the Windows GUI
  • Indicium in the Universal GUI

This seems to work, but it feels a bit implicit.

Questions:

  • Is using app_name() the recommended way to distinguish between Windows and Universal GUI?
  • Is there a more robust or supported method (e.g. via session_context or another mechanism)?
  • What is the best practice for handling GUI-dependent logic like this?

Thanks in advance!

Blommetje

2 replies

Remco
Moderator
Forum|alt.badge.img+3
  • Moderator
  • June 24, 2026

Hi ​@Blommetje 

You could use SESSION_CONTEXT(N'tsf_appl_id') this returns null if Windows GUI 2 tier is used.

Hope this helps.

 

Kind regards,

Remco


Arie V
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • June 24, 2026

@Blommetje What is the reason that you don’t use the Indicium-based replacement for generating reports in the Windows GUI too?