Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Pass a variable into Slide Control Filter
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Pass a variable into Slide Control Filter
 Login/Join
 
Member
posted
I need to be able to make a selection of locations to display in a Top/Bottom table. We have different clients who will use this tool so it needs to change based on how many locations they have. For instance, a client with 40 locations should be able to slide from 1 to 20. A client with 60 locations would be 1-30. I can't find a way to pass that in variable form. This is how the filter is coded.

 WHERE &VarCnt.(FROM 1 TO 10).Variance Count:. GE 1; 


I also have a hold file that will look for locations based on the client logged in and store another variable that is half the count of locations.
TABLE FILE DIMLOCATION
SUM 
COMPUTE LocCnt/I4=CNT.LocationID/2;
ON TABLE HOLD AS LOC FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
ENDSTYLE
END
-RUN
-SET &LocCnt = 10;
-READFILE LOC
TYPE LocCnt = &LocCnt  


If I insert &LocCnt into the Where statement,
WHERE &VarCnt.(FROM 1 TO &LocCnt).Variance Count:. GE 1;  

the filter just reads it as 0. So the slider is a range of 1 to 0 which obviously doesn't do anything. I've tried it with '&LocCnt' and with "&LocCnt" and get the same result. Is it possible?

This message has been edited. Last edited by: FP Mod Chuck,


WebFocus 8207
Windows 10
Excel, HTML
 
Posts: 7 | Registered: July 27, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
May not be the best option, but since I don't know all your code in the filter, can it work using something such as below ?

-IF &LocCnt LE 10 THEN GOTO WHR10;
-IF &LocCnt LE 20 THEN GOTO WHR20;
-IF &LocCnt LE 30 THEN GOTO WHR30;
...
-*-* If none of above IF is true, then perform below as default
-WHR10
 WHERE &VarCnt.(FROM 1 TO 10).Variance Count:. GE 1;
-GOTO ENDWHR
-WHR20
 WHERE &VarCnt.(FROM 1 TO 20).Variance Count:. GE 1;
-GOTO ENDWHR
-WHR30
 WHERE &VarCnt.(FROM 1 TO 30).Variance Count:. GE 1;
-GOTO ENDWHR
...
-ENDWHR


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2339 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Member
posted Hide Post
I appreciate the response, but the issue isn't getting the right number of locations to show up. I need the filter at the top to go from 1 - X. It will vary quite a bit depending on client so trying to make a separate GOTO for each possibility would be way to cumbersome.



Edit: also how do I get images to show up? I've tried imgur and imgBB

This message has been edited. Last edited by: Matthew S,


WebFocus 8207
Windows 10
Excel, HTML
 
Posts: 7 | Registered: July 27, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Matthew

It is not clear where &VarCnt is being set and your WHERE should just be WHERE &VarCnt FROM 1 to &LocCnt without the GE 1. I created a similar report with the car file and used a slider in the html form and it works fine, granted I am using a real field for the WHERE.

 
TABLE FILE CAR
SUM
     CAR.BODY.DEALER_COST
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
WHERE CAR.BODY.SEATS FROM 1 TO &SEATS;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,
$
ENDSTYLE
END 


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1896 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Thanks but the issue isn't actually filtering the data. I need the control at the top to be a slider. The example you provided created a simple filter box where the user inputs a number. I don't want the user to input any number. I want them to select from within range I provide. Here's an example from the manual for 8205 for working slider controls:

https://kb.informationbuilders...slider-controls-8205



Except in the above image, I need the range to be (FROM 1 to &LocCnt) instead of a hard coded number.


WebFocus 8207
Windows 10
Excel, HTML
 
Posts: 7 | Registered: July 27, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Matthew

I created an html formwith a slider control for the variable not an edit box and when I move the slider it filters the report accordingly.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1896 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
I'm not getting that result when I use
 TABLE FILE CAR
SUM
     CAR.BODY.DEALER_COST
BY  CAR.ORIGIN.COUNTRY
BY  CAR.COMP.CAR
WHERE CAR.BODY.SEATS FROM 1 TO &SEATS;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,
$
ENDSTYLE
END 
 


I just get an edit box. Is there additional coding I need to apply?


WebFocus 8207
Windows 10
Excel, HTML
 
Posts: 7 | Registered: July 27, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Matthew

You have to create a separate html form and reference the fex. It will prompt you for what kind of control you want and choose slider.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1896 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Pass a variable into Slide Control Filter

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.