filter data (v2021)

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
ahmed7
User
Posts: 97

filter data (v2021)

Post by ahmed7 »

Hello
I want to filter my data according some filters criteria together(OR not AND) to make multi selected filters for these three field :

AddFilter(ref filter, "field1= '" + CurrentUserInfo("Project_Id") + "'" ) ;


AddFilter(ref filter, "field2= '" + CurrentUserInfo("Project_Id") + "'" );


AddFilter(ref filter, "field3= '" + CurrentUserInfo("Project_Id") + "'" );

but nothing view , if I make each one alone so will be ok to view data , and made (or) between them but it will be error there

Is there any way to make filters correct for multi selection ?

I use v21 not v22 to make multi selected userid security (1,2,3..) so I use this way.

And I hope there is any simple way to make these three fields (single multi selected field) to make one field have data(1,2,3..) filter with user information.

Thanks


MichaelG
User
Posts: 1095

Post by MichaelG »

You can simply construct your filter with the OR condition:

AddFilter(ref filter, "field1 ... OR field2 ... OR field3 ...");


ahmed7
User
Posts: 97

Post by ahmed7 »

So if want to make many field in current user information will be like this too?
AddFilter(ref filter, "field= '" + CurrentUserInfo("info1 OR info2 Or info3") + "'" ) ;


MichaelG
User
Posts: 1095

Post by MichaelG »

No, you need to build one by one:

AddFilter(ref filter, "field= '" + CurrentUserInfo("info1") + "' OR field = '" + CurrentUserInfo("info2") + "' OR field = '" + CurrentUserInfo("info3") + "'") ;


ahmed7
User
Posts: 97

Post by ahmed7 »

so is there any way to make filter with user info field have multi selected data(1,2,3...) instead of making three field in v21?


ahmed7
User
Posts: 97

Post by ahmed7 »

so is there any way to make Advanced Security with user ID Field have multi selected data(1,2,3...) instead of making three field in v21?


ahmed7
User
Posts: 97

Post by ahmed7 »

MichaelG wrote:

No, you need to build one by one:

AddFilter(ref filter, "field= '" +
CurrentUserInfo("info1") + "' OR field = '" +
CurrentUserInfo("info2") + "' OR field = '" +
CurrentUserInfo("info3") + "'") ;
it work for first field only and show the others


ahmed7
User
Posts: 97

Post by ahmed7 »

ahmed7 wrote:

MichaelG wrote:

No, you need to build one by one:

AddFilter(ref filter, "field= '" +
CurrentUserInfo("info1") + "' OR field = '" +
CurrentUserInfo("info2") + "' OR field = '" +
CurrentUserInfo("info3") + "'") ;
it work for first field only and show the others
work fine now


Post Reply