Is it possible to add a filter condition to what gets displayed in the BrowseDialog?


Is it possible to add a filter condition to what gets displayed in the...
Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Aaron Young (3/15/2011)
Hi Marcia,

Sorry for the late reply. Is this still your code?

System.Collections.ArrayList value = new System.Collections.ArrayList();
value.Add(
AppMain.Current_Filter);
MicroFour.StrataFrame.Data.
WhereStatement WhereClause = new MicroFour.StrataFrame.Data.WhereStatement(new String[] { "ProvID" }, value, MicroFour.StrataFrame.Data.WhereStatementTypeOptions.In);

Assuming you are still using the code above, I think AppMain.Current_Filter is the problem. I suspect it is a list of provider ID numbers but they are being added to the value array as a single element. They should be split and added as individual array elements. For example, take a look at this code:-

// This code adds a WHERE clause of "ID IN (10000145, 10000146, 10000149)
System.Collections.ArrayList value = new System.Collections.ArrayList();
value.Add(10000145);
value.Add(10000146);
value.Add(10000149);
MicroFour.StrataFrame.Data.
WhereStatement where1 = new MicroFour.StrataFrame.Data.WhereStatement(new String[] { "ID" }, value, MicroFour.StrataFrame.Data.WhereStatementTypeOptions.In);
e.RawWhereStatementsCollection.Add(where1);

Aaron


Hi Aaron. Thanks so much for all the help you have given me. Everything is working now. The problem was not Current_Filter. I am embarrassed to say that it was the loose nut behind the keyboard Blush
Aaron Young
Aaron Young
StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)StrataFrame User (421 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi Marcia,

Sorry for the late reply. Is this still your code?

System.Collections.ArrayList value = new System.Collections.ArrayList();
value.Add(
AppMain.Current_Filter);
MicroFour.StrataFrame.Data.
WhereStatement WhereClause = new MicroFour.StrataFrame.Data.WhereStatement(new String[] { "ProvID" }, value, MicroFour.StrataFrame.Data.WhereStatementTypeOptions.In);

Assuming you are still using the code above, I think AppMain.Current_Filter is the problem. I suspect it is a list of provider ID numbers but they are being added to the value array as a single element. They should be split and added as individual array elements. For example, take a look at this code:-

// This code adds a WHERE clause of "ID IN (10000145, 10000146, 10000149)
System.Collections.ArrayList value = new System.Collections.ArrayList();
value.Add(10000145);
value.Add(10000146);
value.Add(10000149);
MicroFour.StrataFrame.Data.
WhereStatement where1 = new MicroFour.StrataFrame.Data.WhereStatement(new String[] { "ID" }, value, MicroFour.StrataFrame.Data.WhereStatementTypeOptions.In);
e.RawWhereStatementsCollection.Add(where1);

The above code definitely 100% works so if you can split AppMain.Current_Filter into separate IDs and add them to the array then you could be in luck. If it still doesn't work, can you give me an example for AppMain.Current_Filter?

Aaron

Edited 13 Years Ago by Aaron Young
Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Marcia G Akins (3/15/2011)
...What I really need is for the code that Aaron gave me to put in the BrowseDialog_searching method to work as advertised. I followed his instructions exactly, but the result set was not filtered by the current provider(s).

I see.  Sorry, I have not used that functionality of the Dialog Browser yet.

Edhy Rijo

Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
[quote]Edhy Rijo (3/15/2011)
Probably this thread can help you out: http://forum.strataframe.net/FindPost23458.aspx[/quote]

Hi Edhy.

Thanks for trying to help. I don't think that this is going to do what I want. What I really need is for the code that Aaron gave me to put in the BrowseDialog_searching method to work as advertised. I followed his instructions exactly, but the result set was not filtered by the current provider(s).
Edhy Rijo
E
StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)StrataFrame VIP (4.5K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Probably this thread can help you out: http://forum.strataframe.net/FindPost23458.aspx

Edhy Rijo

Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Trent L. Taylor (3/15/2011)
One other thought on this would be to create a View.  The Browse dialog has the ability to change the query table.  This include the support of a view.  You can also change this at run-time allowing you to have multiple views if necessary.  Just another thought Smile


Can you share some sample code with me? I do not think that the multiple views would work because the user can select one or more providers so the data that the browse dialog runs over would have to change with a dynamic WHERE clause at run time.

TIA

Marcia
Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
This code is still not working to filter the result set. This is what I am trying to do. I have an application level filter set up to displat information from one or more selected providers. When I go to select a patient, I want the result set to include only patients for the provider(s) that have been set up as the application level filter.

When I search, all patient records are being returned.

What am I doing wrong?
Marcia G Akins
Marcia G Akins
StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)StrataFrame User (492 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
This code is not filtering the result set. Here is what I am trying to do. I am searching for patients but I only want the browse dialog to search patients for one or more specific providers that have been set as an application level filter.

Even with the code in the Searching method, I am still getting all the patients back.

What am I doing wrong?
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
One other thought on this would be to create a View.  The Browse dialog has the ability to change the query table.  This include the support of a view.  You can also change this at run-time allowing you to have multiple views if necessary.  Just another thought Smile
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Please don't mention taxes.....


Smile  Amen!

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