2801
Views
7
Comments
Solved
Get Application Name from Espace Id on the database
Question

Hi All,

Inside an aggregate, I am trying to get the application name (not the module/espace name) using the Espace Id.

SyntaxEditor Code Snippet

GetApplicationName()

But this cannot be used inside an aggregate. Any thoughts on alternatives, the system/application entity does not have an espace id, it has an entry_espace_id but that does not seem to be the same thing?


The purpose is to show on a table record:
App Name | Module Name | .... 


The reason I need it inside the aggregate is to group the data by application.


2026-01-26 10-25-31
Lennart Kraak
Champion
Solution

Hi André,

You can query it using system entities, see below.

Espace is being referenced by Module. Module is linked to an Application by App_Definition_Module, which brings you to the Application entity. If you know that your eSpace is the Entry Espace, then it's easier. Just use the Entry_eSpace_Id in Application.

Regards,

Lennart

2018-08-04 18-19-00
André Pinho

Lennart Kraak wrote:

Hi André,

You can query it using system entities, see below.

Espace is being referenced by Module. Module is linked to an Application by App_Definition_Module, which brings you to the Application entity. If you know that your eSpace is the Entry Espace, then it's easier. Just use the Entry_eSpace_Id in Application.

Regards,

Lennart

Got it... I need to join those 4 entities.
I think what was throwing me off is that the application entity refers to 2 espace IDs the entry and backoffice - what do those mean? 


2019-08-31 06-59-55
YS

Hi (: This assumes every Espace has a corresponding Module and App_Definition_Module. Is this always the case?

2021-08-30 15-28-09
Leandro Correa
2018-08-04 18-19-00
André Pinho

Leandro Correa wrote:

Hi André,

Take a look at this post:

https://www.outsystems.com/forums/discussion/20994/getting-application-id-from-espace-id/


I hope this help you.

I did but did search the forum and did read this post before submitting my question but it does not answer my particular question...
I can use GetApplicationName outside of the Aggregate, but not inside.
I cannot seem to figure out the relationship between the Application Entity and Espace Entity (to join them properly), to get the above information inside an aggregate



2026-01-26 10-25-31
Lennart Kraak
Champion
Solution

Hi André,

You can query it using system entities, see below.

Espace is being referenced by Module. Module is linked to an Application by App_Definition_Module, which brings you to the Application entity. If you know that your eSpace is the Entry Espace, then it's easier. Just use the Entry_eSpace_Id in Application.

Regards,

Lennart

2018-08-04 18-19-00
André Pinho

Lennart Kraak wrote:

Hi André,

You can query it using system entities, see below.

Espace is being referenced by Module. Module is linked to an Application by App_Definition_Module, which brings you to the Application entity. If you know that your eSpace is the Entry Espace, then it's easier. Just use the Entry_eSpace_Id in Application.

Regards,

Lennart

Got it... I need to join those 4 entities.
I think what was throwing me off is that the application entity refers to 2 espace IDs the entry and backoffice - what do those mean? 


2019-08-31 06-59-55
YS

Hi (: This assumes every Espace has a corresponding Module and App_Definition_Module. Is this always the case?

2026-01-26 10-25-31
Lennart Kraak
Champion

Well, the Entry_eSpace_Id contains the ID of the eSpace set as Home. This way you can click "Open in Browser" from the Application level.

I'm not sure what/if the BackOffice_eSpace_Id is used for. My guess is that it isn't used.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.