Active Query Builder support area

Format questions on filters in MetadataStructure

Avatar
  • updated
  • Completed

I am able to set a filter using this:


MetadataFilterItem mfi = queryBuilder.MetadataLoadingOptions.MetadataFilter.Add();
mfi.ObjectTypes = MetadataType.Table;
mfi.Object = "%foo%";
queryBuilder.MetadataStructure.MetadataFilter = new MetadataFilter() { mfi };
queryBuilder.MetadataStructure.Refresh();

Although the result works, I would like to make some improvements:
1) How can I display the filter text ("%foo%") in the filter box above the tree?
2) The tables that pass the filter are expanded. How can I collapse them?
3) Once the filter is applied I see the matching tables and then the main DB node which still contains same tables. Is there a way to display just the above ones or just the ones below ?

Additionally and OT: is there a way to format code with a fixed width font when posting to this forum? I looked but could not find anything related to this. I know that I can write my post as HTML code, but I was looking for a quicker way, if at all available.

Thank you,
SM

Avatar
Andrey Zavyalov, PM

If your DatabaseSchemaView.DefaultExpandLevel property is set to non-zero value, try to decrease it by 1 to get fields collapsed.

Sorry, but I even don't know how to get a simple text editor here. I can only see the HTML editor. To format text as code I use the toolbar:

Avatar
Simon

I also had that additional question:

Additionally and OT: is there a way to format code with a fixed width font when posting to this forum? I looked but could not find anything related to this. I know that I can write my post as HTML code, but I was looking for a quicker way, if at all available.

Avatar
Simon

Thank you!

Avatar
Andrey Zavyalov, PM

Hello, Simon.

1. There is no way to display to end-user metadata filters that were defined programmatically.

2. We'll investigate this problem and will fix it if it's a bug in the next build. ("The tables that pass the filter are expanded."). Anyway, we'll let you know about results.

3. Please remove the following line from your code to get rid of the main DB node after search results:


queryBuilder.MetadataStructure.MetadataFilter = new MetadataFilter() { mfi };