Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Brian Grewal
2
Views
1
Comments
Passing Entity name as parameter to a procedure
Discussion
How-to
I have a procedure in the backend which expects Entity name as parameter. I created an action with advance query and in my SQL statement i have Exec Proc1 {MenuItem}.
This fails because {MenuItem} = db.schema.object
If I say '{MenuItem}' then the entity name is not materialized. I'm Version 9.0 SQl Server 2012.
Is there a way to accomplish this? I would like to have EXEC Proc1 'db.Schema.Object' in quotes.
Thanks in advance.
Brian
Guilherme Pereira
Staff
Hi Brian,
To get the physical table name from an OutSystems entity you can add a reference to the
Entity table
and use an aggregate / query to fetch that value from the table. Make sure to also include the
Espace table
and join them as well as filter the Espace.Name with your espace module name.
With that you can then use a parameter in your SQL widget (e.g. TableName) and pass the table name you got. It could then be something like:
Exec Proc1 @TableName
if you want to put in quotes you could pass them in the input parameter
Hope this helps.
Cheers
LGP
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...