Add platform_id variable to context procedure

Related products: Software Factory Windows GUI Universal GUI

We need to switch detail tabs on or off, depending on the platform that is used. This because some screen controls are not available for all platforms, like the Card List.

Creating different variants for different platforms is not a good alternative, because this results in to much maintenance and side effects.

Having the platform_id available in the context procedure would be a perfect solution for now.

Or, a global function, like dbo.tsf_platform_id() is also fine.

Hey Harm,

One already available alternative would be utilizing Session variables. If for instance you would have separate IAM applications for the Windows GUI and the Universal GUI, you could use the tsf_appl_alias session variable to obtain the alias of the current application the user is in.

Let's say the Universal application uses the alias PROD, and the Windows application uses the alias PROD_WIN, then using the following code, you can obtain it's alias.

select SESSION_CONTEXT(N'tsf_appl_alias')

Inside your context procedure, you could use this to determine from which platform the application is used, and use that to our advantage. For example:

if SESSION_CONTEXT(N'tsf_appl_alias') = 'PROD' -- Windows
begin
set @ref_master_detail_type = 2 -- Hidden
end

Would this suffice?

 


NewNeeds feedback

Hi Mark, this sounds as a good workaround. At this moment we have only one application in IAM and there is no need for us to create two. Actually we don't like to maintain a second application in IAM only for this.

Is it not possible for you to create and maintain an extra session context “tsf_platform_id” in the GUI, so that we can make use of that?

 

 

 


Hi Harm,

Indicium cannot distinguish the platform that is using its API. A user can use the Universal GUI, or the upcoming Windicium, or send requests to the API using a browser or using a program such as Postman. There are numerous ways the API can be called and we intend to keep Indicium platform-independent.

The workaround is currently the most feasible way to achieve this. Understandably it causes a bit of overhead maintenance, but for the most part it shouldn't be too time-consuming as you are able to copy an existing application in it's entirety to create a new one. The main differences between the Windows and Universal applications would then be the Alias, and the User group-role configuration in case the Universal GUI should not be used by Windows GUI users and vice versa.


Mark,

Having 2 applications in IAM, means that we have to maintain users in 2 applications. Some users will use both the Universal and the Windows GUI.

Everytime when we release a new version / branch, we will need to do it twice.

I really don't see why you are not able to provide the platform_id in the context procedure. Precisely because the platform is independent, I want to know from which platform the connection was made.


Needs feedbackUnder review

Hi Harm,

My colleague just gave me a great idea, you can do the following:

if SESSION_CONTEXT(N'tsf_appl_id') is null
begin
do something
end

The tsf_appl_id session variable will only be set by Indicium, meaning for Windows GUI this variable will return NULL. This will enable you to hide the detail in Universal GUI.

I didn't know about this before either 😅 Will this resolve it?


Mark,

This is a workable solution 👍🏻

I would still consider to make a parameter/variable "platform_id” available in context and layout procedures to make more easy

 

 


Hi Harm,

We'll take your suggestion into consideration. As my reply helped you out with the initial idea, we'll close the idea for now.


Under reviewClosed