cancel
Showing results for 
Search instead for 
Did you mean: 

Can you add "OR" clauses of the same search field with Dynamic Query?

Former Member
0 Kudos

Hi Experts,

I'm building a query in which I would like to be able to search for agreements that belong to 1 or 2 or multiple agreement owners. From a SQL stand point it should be very basic.

SELECT agreements FROM table

WHERE owner=John

OR        owner=Pete

OR        owner=Jose

But how can we add those "OR" clauses to the query dynamically when executing the query? Let's say that when you execute the query the initial filter prompts look like this:

Business Unit: _____

Owner: _____

****then you have a button or control that adds another owner field and it ORs it to the query

"ADD OWNER TO SEARCH"   <-- This is a button

Thanks for your advice guys!

Regards,

Ivan D. Miranda

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ivan,

I understood your requirement that you want to fetch all agreements which owned by suppose user 'A', 'B' and you want to achieve this dynamically when execute query.

To achieve this you do not do anything you go to 'Search Master Agreements' query and another field using add button there and select 'Agreement Manager'. Like this you add another field and select same agreement manager field and give owner user name there and search then you will get all agreements owned by (suppose if you give A and B) A and B.

Dynamically all filter prompts uses OR operator to fetch results.

Hope this helps.

Regards,

Gurvi.