849
Views
6
Comments
Solved
Advanced SQL IN Clause
Application Type
Reactive

Hello community,

I am learning to apply Advanced SQL in outsystems in which i have to apply IN clause for 

which a comma separated list of all the codes is required.

Is there any built in function for that ??

Can anyone suggest right way to do that ??

2025-09-21 06-51-05
Mohd Anees Mansoori
Solution

Hi,

Please check the below link:

https://success.outsystems.com/Documentation/Best_Practices/Development/Building_Dynamic_SQL_Statements_the_Right_Way

Inside the manage dependencies window you will get sanitization extension there you will find built in function for comma separated list.

Regards,

Anees

2024-07-16 17-36-51
Shradha Rawlani

Hi,

if Text list length is greater than 1000 how I will use it IN clause

Regards

Shradha

2023-09-05 06-31-18
Pavan Rajapurkar
Solution

Hello Quadir.K

You could convert your aggregate to SQL and use the BuildSafe_InClauseIntegerList and BuildSafe_InClauseTextList action from sanitization module. 

Please refer to this link

Hope it helps you.

Regards,

Pavan R

2025-12-15 09-29-24
Thibaut G
Solution

You can use the BuildSafe_InClauseTextList from the  Sanitization extension.

First, create a string from the data you need using this action:

create an input parameter in your advanced SQL and assign the result from the previous Step.
Don't froget to put the 'EXPAND INLINE' on YES or it will not work.

2023-09-05 06-31-18
Pavan Rajapurkar
Solution

Hello Quadir.K

You could convert your aggregate to SQL and use the BuildSafe_InClauseIntegerList and BuildSafe_InClauseTextList action from sanitization module. 

Please refer to this link

Hope it helps you.

Regards,

Pavan R

2025-12-15 09-29-24
Thibaut G
Solution

You can use the BuildSafe_InClauseTextList from the  Sanitization extension.

First, create a string from the data you need using this action:

create an input parameter in your advanced SQL and assign the result from the previous Step.
Don't froget to put the 'EXPAND INLINE' on YES or it will not work.

2021-10-09 07-57-44
Stefan Weber
 
MVP

Hi,

i created a Forge component that shows how to apply a facet filter using an advanced sql in clause query. https://www.outsystems.com/forge/component-overview/15145/pattern-sql-patterns

Stefan

2025-09-21 06-51-05
Mohd Anees Mansoori
Solution

Hi,

Please check the below link:

https://success.outsystems.com/Documentation/Best_Practices/Development/Building_Dynamic_SQL_Statements_the_Right_Way

Inside the manage dependencies window you will get sanitization extension there you will find built in function for comma separated list.

Regards,

Anees

2024-07-16 17-36-51
Shradha Rawlani

Hi,

if Text list length is greater than 1000 how I will use it IN clause

Regards

Shradha

UserImage.jpg
Quadir.K

Thank you All

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