cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict Query Columns

Former Member
0 Kudos

I have a XML file that I would like to sort and filter on. So I bring it up on the XML file in a IGrid so that they can see what kind of data they have to work with. Then below there is some fields that I use to pass into a Xacute query to which runs the filtering and sorting block in Business Logic. The filtering and sorting works great. Now my problem comes in when the user just wants to see certain columns of data. I have created a multi select list of the column names which I use in the DisplayColumns parameter for the iGrid. When the user goes to save the file as CSV it only returns the sorted and filtered list and does not return with the column restrictions. Is there a way to restrict columns displayed in the iGrid that will also appear when saving as CSV.

Thank you for your assistance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Kyle, if you think "in reverse", there's an action in MII BLS called the "Column Stripper" which will remove the columns you don't want in the dataset. If you get a list of these (basically, the "unchecked" items in your multiselect list), send them to BLS as a comma-separate list, parse the comma separated list in your BLS transaction (after you've sorted/filtered), repeat on each item in the list, and call the ColumnStripper action.

I won't tell you what the original icon for the "ColumnStripper" action was we when wrote it, but suffice to say it wasn't "safe for work".

Former Member
0 Kudos

I think I have an idea.

There is a potential to be numerous columns that I would like to have 'stripped' out. Is the number of columns that can be stripped limited to 8 or can there be more by passing it into the logic from the webpage via a comma separated variable?

agentry_src
Active Contributor
0 Kudos

Kyle,

I think what Rick was saying is

1. Repeat on each column to be stripped.

2. Strip that column using the column stripper

3. Overwrite the old xml with the new and use it as your input to the column stripper on the next cycle

This should work for any number of columns.

Good luck,

Mike

Edited by: Michael Appleby on May 22, 2008 2:15 PM