47
Views
6
Comments
Solved
Can you tell me SQLquery when searching from a list using a checkbox
Application Type
Traditional Web

Can you tell me SQLquery ,for filtering a list using a checkbox


Iwant to convert this to SQL

Session.MailFlag = False or CVIP_Mail_Crpnd.MAIL_FLG = True

2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello Dilmi,

Kindly find attached oml but please note that I made many changes to your module first thing I found you are using two different quires to return data. In preparation you are using aggregate and in search button you are using SQL query so I add local variable EmployeesList of data type list of Employ and in both cases assigned returned list from quires to this list then bind this list as data source for table.

I also created input parameter for SQL query as text which contains Ids of states selected comma separated and set it property Expand Inline to Yes

Employ_Updated.oml
UserImage.jpg
Dilmi Amarasingha

Thank you @Mostafa Othman 

2020-11-25 10-45-32
Mostafa Othman
Champion

Hello Dilmi,

I am not sure what you are trying to implement so if you can explain more what is your scenario you are trying to implement or share action you are creating.

Let me try to suggest solution based on my assumption. You can add advance SQL query to your action and inside it add input parameters which will be value of session mail flag (SessionVariable) variable and value of  CVIP_Mail_Crpnd mail flag (MailFlagValue) then you need to add output structure for your advanced SQL

for SQL statment you can write:

Select * from {CVIP_Mail_Crpnd}

where @SessionVariable = false or {CVIP_Mail_Crpnd}.[MAIL_FLG ] = @MailFlagValue 


You can read more here about advanced SQL:

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/SQL_Queries

UserImage.jpg
Dilmi Amarasingha

please anyone can share the query for filter the ACTIVE Inactive Close data


Employ.oml
2022-12-12 06-07-07
Dhivyaraj Sivam

Hi Dilmi,

I have attached an OML file to filter the active and inactive SQL queries.


Regards,

Dhivyaraj Sivam

Employ.oml
UserImage.jpg
Dilmi Amarasingha

it doesn't work

2020-11-25 10-45-32
Mostafa Othman
Champion
Solution

Hello Dilmi,

Kindly find attached oml but please note that I made many changes to your module first thing I found you are using two different quires to return data. In preparation you are using aggregate and in search button you are using SQL query so I add local variable EmployeesList of data type list of Employ and in both cases assigned returned list from quires to this list then bind this list as data source for table.

I also created input parameter for SQL query as text which contains Ids of states selected comma separated and set it property Expand Inline to Yes

Employ_Updated.oml
UserImage.jpg
Dilmi Amarasingha

Thank you @Mostafa Othman 

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