In Sql Query node from Server Action is it possible to get entitys data from Outsystem database using entity physical_table_name. If it is possible pleases help to get Dynamic entity data and store in a variable.
There's two things here:
SELECT * FROM OS@TableName
Hi nani pappala,
Please check this discussion, will get the solution.
https://www.outsystems.com/forums/discussion/46809/dynamic-advanced-sql-table-name-as-a-parameter/
Thanks,
Ramesh
I have already checked this Discussion but i couldn't find the solution for my requirements.
Can you explain why it doesn't offer a solution? It seems that it is exactly what you need. Either you didn't understand what is written in that topic, or you didn't explain your requirements very well.
The sql output will be dynamic, so how should i create a dynamic structure based on the sql output
Ah, that's what you mean. You cannot do that of course. OutSystems is statically typed, there's absolute no way to have an SQL with a dynamic output.
I have a entity called "seller" and its physical_Table_Name is "OSUSR_9ls_Seller".I need to get data inside a Seller Entity by using its physical_Table_Name and convert into json format. (what ever the process i am asking you is it possible.)
How to do this for external database? Physical table name is '[MDMStaging].[dbo].BAU_EASY_CMSL'
Hi Shubham,
I'm not sure what you mean. This topic is explicitly about system entities. Connecting to external databases is done in quite a different way. Note that the SQL you put in a SQL node is sent to the OutSystems database, there's nothing you can change about that.
Hi,
I understand that this topic is about system entities but I am facing very similar problem with external db entities.
I have already integrated the external db. However I want to fetch the data of the particular entity from the external db on the basis of entity name that will be provided through input.
In short I am trying to achieve SQL query to fetch records from any entity on the entity name
I hope you understand the question
I suggest you open a new topic on the forum, as what you want may seem similar, but I don't think it actually is. It will also get more views than replies to 1,5 year old posts.
Hi @nani pappala,
The actual table information is available in Entity. Manage dependencies>System Entities> Espace,Espace_Entity and Entity. Run an aggregate with the joins of the above three entities and pass your table name in Entity>Name.
Note that you need to define an Output Entities/Structures that matches the type of your SQL output.
May I ask why you need this behavior?
Regards
Thank you for your response,
But i need to fetch the entity data from database not from the system (entities) and system entities are not the Correct to fetch entity data.
This reply already gave you the answer https://www.outsystems.com/forums/discussion/86587/get-entity-data-from-database-using-physical-table-name/#Post365784