Browse Dialog - Filter options


Author
Message
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
In our CRM package we can assign sales reps to sales managers. When a sales manager looks at a job listing or account listing they can only see the records for his/her own sales reps.

I need to build a sales manager browse dialog and need to hide the sales rep field, which I can do, but I need to supply a filter behind the scenes such as SalesRep = 'A' or 'B' or 'C' etc.. 

Can I do something like this in the current version?  If not, do you plan on adding this sometime soon?

Thanks,

Tim

Replies
Tim Dol
Tim Dol
Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)Advanced StrataFrame User (666 reputation)
Group: Forum Members
Posts: 340, Visits: 1.4K
How can I filter multiple values for a single field?

Say I am browsing the customer database and on the browse I have a hidden search field called 'SalesRep'. My database contains 10 records for SalesRep 'A', 5 records for SalesRep 'B' and 3 Records for SalesRep 'C'.  The current user is only allowed to view customer records for SalesRep 'A' or SalesRep 'B'.  I cannot show any customer records that belong to SalesRep 'C'.

Can my search return all records for SalesRep 'A' and 'B' ?  How would you set 'MyFilterValue' to produce this result?. Can I use the same filter logic as I would in the business object filter....  SalesRep = 'A' or SalesRep = 'B'

Thanks

Tim

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Trent may correct me if I'm wrong, but I don't think that's currently possible with the BrowseDialog.  All search field values are AND'ed together, and anything you type in has to be able to be placed within a sql parameter.  So, if you wanted to include a field twice, that's fine, but it would have to be something like date < max AND date > min where 'date' is the same field.  So, if you want to have several values OR'ed together, such as in your example where you want to allow one or more of several explicit values, it's not possible at the moment.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Wait a second, I just remembered that we added the Searching event to the BrowseDialog.  In the event args of the event, we pass over the raw WhereStatement collection for the query to be executed.  You still cannot choose to have the values OR'ed together, but in this case, you could use the IN statemet type, so the value would be produced like:

SalesRep IN ('A', 'B')

which would accomplish the same thing for you.  So, you would just have to add a new WhereStatement to the collection with a type of WhereStatementTypeOptions.In and the Values ArrayList containing the "A" and "B."

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search