@SetViewInfo Filter (what else is new)

I seem to be one of many with problems getting @setviewinfo to work as desired. I understand the limitations of this function, but I haven’t found anyone that seems to be trying exactly the same thing…

I have a view that has a Category in the first column, a flat category in the second column which sits next to the documents in the third column. Like this:

Customer Category

Flat Category | Customer Name

So with real data, it looks like this:

Acme Wholesale Chain

| A | Acme Northeast

| A | Acme West Coast

| B | Acme Southwest

| B | Acme Mid Atlantic

| C | Acme Southeast

I want to use @setviewinfo to filter only the A,B or C categories, but I am getting strange results. It is filtering, but I can’t explain the logic by which it filters. Not only am I not getting all of the documents in the flat category, but the ones I do get arent even in the correct category.

I am working within a frameset.

View Action Button Code:

choice:=@Left(@Prompt([OkCancelList];“Select Filter Option”;“Please choose one”;“”;“A ranking only”:“B ranking only”:“C ranking only”:“-none-”);1);

@SetTargetFrame(“Main”);

@UpdateFormulaContext;

@Command([ViewExpandAll]);

@If(choice=“-”; @SetViewInfo([SetViewFilter];“”;“”;1);@SetViewInfo([SetViewFilter];choice;“$abcFilter”;1))

any help would be appreciated. thanks

Subject: RE: @SetViewInfo Filter (what else is new)

Why fight it? Use a view that’s categorized first by the A - B - C ranking and then by company. If the user chooses None, switch to a different view.

I’m pretty certain you won’t get this to work the way you’re trying it.

Subject: RE: @SetViewInfo Filter (what else is new)

I know I know… I would do that but I am also using “Average per Document” totals which don’t calulate correctly if the first column is the rankings. (well it calculates as designed, but that’s not the way management wants it to calculate)

In fact I tried it that way first, and switched tot he @SetView Info function because of the totals issue.

I guess I have to create my own “filter” views… about a dozen of them, then I will be laughing at the next guy who comes and looks at my design and asks, “Why didn’t this guy just use @SetViewInfo?” :slight_smile: