Skip to main content
Question

Best way to detect client type

  • June 19, 2026
  • 4 replies
  • 42 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

4 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? 


Forum|alt.badge.img+13
  • Author
  • Superhero
  • June 25, 2026

Hi ​@Arie V 

I'm continuing the work, based on the decision made back then. As said, the task starts a flow, this flow calls Indicium and creates the report. This works quite ok, but not really future proof. 

So, I'm now considering creating an entire new flow, that creates the report - as a report - not a task. I'm note sure if this will work as normal in windows - since when this thing started, it didn't. Perhaps there is miscommunication here, but can you in short sketch out the flow/way or working that is advised in this manner? It must work now in both gui's, and when we say goodbye to win gui, I want to have the least amount of work to have a robust solution in uni gui. 


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

@Blommetje We recommend replacing the tsfreportmailer with the Reporting Service which introduces a separate queue using a System Flow that a-synchronously processes the Reports.

More recommendations on transitioning to the Universal UI and replacing deprecated features can be found in the Docs too: Transition to the Universal UI | Thinkwise Documentation