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
Chris_
1
Views
8
Comments
Return Value
Question
Hi,
I'm new in Outsystems.
just need help on how to get the return value of a query.
INSERT INTO Table1(Name) VALUES(@Name)
RETURN SCOPE_IDENTITY()
or
how do i use the OUPUT parameter in the query?
thanks in advance..
Miguel Seabra Melo
Hi Chris,
Quick question: any reason why you wouldn't want to use the Built-In Entity action
Create<YourEntityName>
(In this case CreateTable1) instead? That also returns the inserted record's new ID, is much cleaner to look at in a flow and it will work in Oracle too.
Cheers,
Miguel
Chris_
Yeah I know that part but i didn't use that function of outsystems instead i used advance query for my insert.
the reason behind that I didn'nt use the built-in function is that because I didn't use the edit widget's variables because sometimes some of the data will come from another table and i have to retrive it and the can edit the values.
i need to retrieve the ID once the user save the transaction, the destination will be the Show webscreen and i have to past the ID in it then the user can encode other details of the transaction.
2 replies
Last reply 02 Oct 2012
Show thread
Hide thread
Ricardo Saraiva
Chris Librero wrote
:
the reason behind that I didn'nt use the built-in function is that because I didn't use the edit widget's variables because sometimes some of the data will come from another table and i have to retrive it and the can edit the values.
Hey Chris,
can you explain it better? Sometimes you have input parameters, other times you don't?!
I didn't get it...
Best regards,
--
R. Saraiva
Chris_
Saraiva wrote
:
Chris Librero wrote
:
the reason behind that I didn'nt use the built-in function is that because I didn't use the edit widget's variables because sometimes some of the data will come from another table and i have to retrive it and the can edit the values.
Hey Chris,
can you explain it better? Sometimes you have input parameters, other times you don't?!
I didn't get it...
Best regards,
--
R. Saraiva
Hi R. Saraiva,
Yes, it depends on the transaction. there is a type of transaction that the user will just get the majority of the inputs from another table(other department) for them to not manually encode the details.
Miguel Seabra Melo
Chris, you're not limited to passing a full, unadulterated, EditRecord variable into the CreateTable1 action.
If you need to assemble info from various sources, simply have a Local Variable (say,
MyTable1Record
) in the screen action of Data Type
Record
and Record Definition
Table1
.
Then use an Assign node to set the individual fields from wherever they may come and pass
MyTable1Record
to CreateTable1.
Incidently, I admise you to call Table1 something else so you can keep track of what your Entities are...
Miguel
Chris_
Thank you Miguel..
I understand what you said but i don't know to put it in outsystems.
can you send me a sample oml with version 6.0.1.21 if it just ok with you?
I'm totally newbie in outsystems.
Thank you.
Miguel Seabra Melo
chriztoph wrote
:
Thank you Miguel..
I understand what you said but i don't know to put it in outsystems.
can you send me a sample oml with version 6.0.1.21 if it just ok with you?
I'm totally newbie in outsystems.
Thank you.
Hi,
This is a completely contrived example, but have a look and see how it roughly goes.
Cheers,
Miguel
CreatingARecordFromMultipleSources.oml
Chris_
Got it Miguel..
Thanks.
but is there a way to return a value in advance query with insert/update??
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...