Entity Name retrieval

Hi,

I'm trying to get the entity Name of any entity in my module, by passing the any key specific to that entity. 

When the entity is created, a records is being made with the Name of the entity and its Physical name in the system's entity table. But there is no way for me to retrieve the name of the current entity. 


For eg: Entity1 

              Id

             Name



I can access the records of the entity by giving entity1 as the parent (entity1.Id or entity1.Name). Now I just want to get the name of the entity alone, may be to give an alert saying entity 1 is updated. Is there a way for it without hardcoding the table name in alert message.


Thanks and Regards,

Priya 



Hi Priyadharshini,

Why do you want to get the entity name?



Regards,

Amreen


Hi,

Manage your dependencies to include those tables:



Get your assign the GetEntryEspaceID() to get your Espace:


Get an aggregate to name of the entity form that eSpace


Best regards.

Hi  Pedro, 


Thank you. But in my case, I want to get any specific entity name. This approach will provide me the entity names of all the entities on the espace.


Thanks and Regards,

Priya 

I only can see this way.

For eg: Entity1 

             Id

             Name
             EntityName ( Add new attribute) - Add a fixed collunm with the entityName if with aggregate. If you want to use AdvancedQuery you can add a String with the entity name.


After that you can add this attribute at your Feedback Message.


Best Regards.

Hi Priya,


As suggested by Pedro, only adding new attribute in your entity to hold this entity name can use to get the updated entity name in your feedback message.


Thanks,

Manish Pandey 

Hi Priyadharshini S

If you need something more, feel free to ask


Manish Pandey, yes i think it's the best way do what i told before.


Best regards

Hi Pedro and Manish, 


Thank you for the details. But what I'm looking at is some kind of generic functionality to know the current entity name. Like we have the built in GetApplicationName, GetESpaceName and all that. I felt such a functionality is not available ,based on the suggestions we have so far. Hence raised an Idea request . 


Thanks again for the efforts.


Regards,

Priya

Hi Priyadharshini SPriyadharshini S!


You have a system table "OSSYS_ENTITY". You could search, by an advanced query, for the table that you want.


select Ossys_entity.NAME from Ossys_entity;


It gives you information about all tables that you have in your database. You can search by EspaceId or physical_table_name adding a "WHERE" clause.

select Ossys_entity.NAME from Ossys_entity

where physical_table_name like upper("%physicaltablename%");


hope i had help you!

Best Regards,

Nuno Pereira

I somehow dont get you concept of current entity .. in a screen you do have one entity so thats always the current entity. If you somehow created a generic update (wouldn't know why but ok) you call it from a module, but there you do know the 'current' entity, most easy is to call you action and add a parameter for the entity name and just hardcode that to your action so you can display the name.. 

regards,

Wim

Wim van den Brink wrote:

I somehow dont get you concept of current entity .. in a screen you do have one entity so thats always the current entity. If you somehow created a generic update (wouldn't know why but ok) you call it from a module, but there you do know the 'current' entity, most easy is to call you action and add a parameter for the entity name and just hardcode that to your action so you can display the name.. 

regards,

Wim

Hi Wim, 


Yes.. I will know my current entity, but instead of me hardcoding the value,I was checking for an option to get it from some function like getCurrentEntity(). 


Thanks and Regards,

Priya 


Nuno Gonçalo Pereira wrote:

Hi Priyadharshini SPriyadharshini S!


You have a system table "OSSYS_ENTITY". You could search, by an advanced query, for the table that you want.


select Ossys_entity.NAME from Ossys_entity;


It gives you information about all tables that you have in your database. You can search by EspaceId or physical_table_name adding a "WHERE" clause.

select Ossys_entity.NAME from Ossys_entity

where physical_table_name like upper("%physicaltablename%");


hope i had help you!

Best Regards,

Nuno Pereira


Hi Nuno Pereira, 


Thank you for the suggestion. It is helpful but what I'm looking at it for an option to get the entity name from some kind of inbuilt function. Here I will have to hardcode the value of the table in the where clause, which I would want to avoid.


Thanks and Regards,

Priya 

Priyadharshini S wrote:

Nuno Gonçalo Pereira wrote:

Hi Priyadharshini SPriyadharshini S!


You have a system table "OSSYS_ENTITY". You could search, by an advanced query, for the table that you want.


select Ossys_entity.NAME from Ossys_entity;


It gives you information about all tables that you have in your database. You can search by EspaceId or physical_table_name adding a "WHERE" clause.

select Ossys_entity.NAME from Ossys_entity

where physical_table_name like upper("%physicaltablename%");


hope i had help you!

Best Regards,

Nuno Pereira


Hi Nuno Pereira, 


Thank you for the suggestion. It is helpful but what I'm looking at it for an option to get the entity name from some kind of inbuilt function. Here I will have to hardcode the value of the table in the where clause, which I would want to avoid.


Thanks and Regards,

Priya 

I understood you, but you need to have some reference to your table, so that you could search for her.

If you put a combo box with a list of all table names, and if you select a table name and if you send this name to a function that run this advanced query:

select Ossys_entity.NAME from Ossys_entity

where physical_table_name like upper("%physicaltablename%");

which "physicaltablename" is the input argument of the function and consequently the input argument of your advanced query.

You will get your tablename as you want. dont exists any other option to do a getTableName() without information about her that i know..

This won't be a totallly dynamic method, but i think it solve your problem..


Best Regards,

Nuno Pereira