Hidden Search Fields on Browse Dialog


Author
Message
Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Hi Everyone,

I am trying to show a Browse Dialog that is "pre-filtered" to only show records that belong to a specific Customer while allowing the user to then search through that subset. I am trying to use a hidden field to accomplish this.

The code below works as long as the foreign key search field is visible. If visible is set to false the foriegn key field's initial value is ignored and all records are returned.

Me.JobsitesBrowseDialog.SearchFields.Item("js_FK_cu_id").InitialValue = Me.CustomerBO1.cu_pk_id

' Me.JobsitesBrowseDialog.SearchFields.Item("js_FK_cu_id").Visible = False

Me.JobsitesBrowseDialog.ShowDialog(True)

 

 


Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If the field is not visible the field is ignored when executing the search.  One thing you can do though, is allow the field to be visible, but do not allow the search panel to be seen.  Since you are already providing all of the search criteria, you really only want to show the search results anyway. 

You can changes the formlayout before you call the ShowDialog.  Just move the BrowseResults into the top panel and hide the bottom.  This way all you see is the browse results (an possibly an information or side panel...which you can turn off as well).

Me.JobsitesBrowseDialog.FormLayout.TopPanelContents = BrowseDialogLayoutType.BrowseResults


Me.JobsitesBrowseDialog.FormLayout.ShowBottomPanel = False

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Thanks Trent that will probably get me through this instance as the result list will likely be under 20 records for the most part.

I was hoping to be able to "pre-load" the dialog with the result set for just that customer and then allow the user the abiltiy to specify additional search criteria such as city etc. to drill down a bit more into the pick list.

If the non visible search fields are not used in the search what would be the reason for having the visible property on a search field? It seems to me that even if a developer wished to simply hide the field for whater reason including the hidden field in the query would not affect the result set unless there was a default value set on it? One of those things I guess

Thanks  again

P

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
If the non visible search fields are not used in the search what would be the reason for having the visible property on a search field?

We may add a property that allows the developer to determine if the hidden fields should be included on a search.  The reason this field exists is so that you can go in and pre-define as many search fields as you would like.  You can then write a preference form to allow your end-users to determine which fields they would like to see, and in what order, in their search window.  You would then set the fields according to the saved preferences before the form is shown.  This is what we do for our end-users because everybody has their own idea of what fields that they want to have to search on...this way we can let them pick and choose while maintaining the integrity of the browse.

Paul Chase
Paul Chase
Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)Advanced StrataFrame User (806 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Thanks for the explanation Trent it makes sense. I should be okay with your earlier suggestion. I'm sure ya got bigger fish in your frying pan right now anyways.

Paul

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