Focal Point
[CLOSED] Passing Numeric Drill Drown parameters

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8767079776

August 21, 2015, 04:03 PM
Nicholas Spyrison
[CLOSED] Passing Numeric Drill Drown parameters
I have an 11 parameter drill down. The Alphanumeric parameters pass through fine with .QUOTEDSTRING. Yet, when I try code a Numeric WF forces the .QUOTEDSTRING after the &var. The summary fex works as expected, but when I call the detail fex I receive the following error:
  (FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR 


What is the best approach? Is there a way to suppress WF from authoring .QUOTEDSTRING?

Related summary fex code below. &CURYM and &NMONTHS are the only numeric parameters:
 
-DEFAULT &NMONTHS = 3
-DEFAULT &CURYM = 201508 
...
TYPE=DATA,
     ACROSSCOLUMN=N1,
     DRILLMENUITEM='RentTrends',
          FOCEXEC=IBFS:/WFC/Repository/BI_Development/~nspyrison/Rent_Trends/MAIN_4_detail.fex( \
     Property_Property_Status=&Property_Property_Status.QUOTEDSTRING \
     Property_Market=&Property_Market.QUOTEDSTRING \
     Property_Property=&Property_Property.QUOTEDSTRING \
     Lease_Rent_Trend_Ready_Flag=&Lease_Rent_Trend_Ready_Flag.QUOTEDSTRING \
     Property_AD_DM_Prop_BU_Unit_Area_Director=&Property_AD_DM_Prop_BU_Unit_Area_Director.QUOTEDSTRING \
     Property_AD_DM_Prop_BU_Unit_District_Manager=&Property_AD_DM_Prop_BU_Unit_District_Manager.QUOTEDSTRING \
     FIELDTYPE=&FIELDTYPE.QUOTEDSTRING \
     DISPBY=&DISPBY.QUOTEDSTRING \
     CURYM=&CURYM.QUOTEDSTRING \
     NMONTHS=&NMONTHS.QUOTEDSTRING \
     ),
          TARGET='_blank',


Thanks!

This message has been edited. Last edited by: Nicholas Spyrison,


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
August 21, 2015, 04:36 PM
Shahram
WF automatically inserts the .QUOTEDSTRING since it does not know the value of your parameter which is OK.
You just need to make sure the numeric variables in your detail report at the WHERE section are not in quotes.

Also one good technique is to turn on the echo on your detail report in order to see what is being passed by summary report.
Add the following line on top of your detail report

-SET &ECHO=ALL;

Have a great weekend.


All Releases
All OS, All Outputs
August 21, 2015, 06:30 PM
Nicholas Spyrison
The GUI won't accept the &Var without quotes. I also tried breaking it out LT/GT to no avail.

 WHERE RENT_TRENDS.RENT_TRENDS.Date_YYYYMM FROM '&CURYM' TO '&CURYM3'; 


does it matter that I am passing &CURYM and using SET on &CURYM3?

Thanks, you too!


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
August 23, 2015, 04:42 AM
Danny-SRL
Nicholas,
What is the format of your Date_YYYYMM field?
If it is numeric then you should not have quotes around your &variables.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

August 24, 2015, 09:23 AM
Shahram
Nicholas,
you are getting error 281 on your drill report. It does not matter how you pass or set the variable. It is all about the WHERE statement.
If the field Date_YYYYMM is an alpha the you require to have single quotes around your variables and if it is numeric, you cannot have the quotes. but id the field is a date format, the QUI will insert quotes but also will work without the quotes.

To make the story short we need to find out the format of Date_YYYYMM.
If you do not have access to metadata, you can create a new program that contains this line to get a list of all the fields and their formats:

?FF RENT_TRENDS


All Releases
All OS, All Outputs
August 24, 2015, 11:16 AM
Nicholas Spyrison
Date_YYYYMM came through the adapter as A6. The data also has Date_Calendar_Month_YYYYMM as I6.

I switched over to Date_Calendar_Month_YYYYMM (I6) without the single quotes and am still receiving the (FOC281), but the error is occurring in my Dialogue Manager or Optional Parameters and not the WHERE statement. Is WF being picky about the pre-report order or is it related to the format in the WHERE statement?

Thanks again!


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
August 24, 2015, 12:02 PM
susannah
use an IF statement when comparing a field to a constant. so much less overhead, and no agita.
you can leave the quotes off the numeric value.

you can also do some investigating on the passed paramters...at the top of your fex, do some research, examine the .TYPE and .LENGTH of your incoming parms.
.TYPE will give you A or N
-TYPE &|Date_YYYYMM: &Date_YYYYMM &Date_YYYYMM.TYPE
-EXIT

sometimes you'll have a parm such as 00043
you can clean it up by
-SET &myparm = &myparm * 1 ;
and then when you re-examine your parm, you'll get 43 and the .TYPE will be N.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 25, 2015, 10:07 AM
John_Edwards
-SET &DATE_YYYYMM_FIXED = &DATE_YYYYMM ;

Use &DATE_YYYYMM_FIXED in the Where clause.



August 25, 2015, 11:19 AM
Nicholas Spyrison
susannah-

a WHERE IF? I am under the impression that I am not working with constants.

Thanks, I have already been doing similar investigation.


John-

Date_YYYYMM is a field. I have tried the Define version of DATE_YYYYMM_FIXED I am running into other issues.


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube
August 25, 2015, 11:28 AM
Wep5622
quote:
Originally posted by Nicholas Spyrison:
susannah-

a WHERE IF? I am under the impression that I am not working with constants.


Susannah meant IF instead of WHERE. As long as you're comparing simple expressions, you can use IF.

That said, we never use IF because we don't find the performance gain significant enough to bother with the distinction. We don't use TABLEF either.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
August 25, 2015, 12:03 PM
John_Edwards
Alright,

-SET &CURYM_FIXED = &CURYM ;

Use &CURYM_FIXED in your Where clause.

The SET command will assign the quoted string to a new variable, using the new variable without quotes around it effectively removes them.

I don't run into this problem because I create my own html pages for input, but this would appear to be a simple solution to remove the quotation marks.



August 25, 2015, 03:54 PM
Nicholas Spyrison
Finally got to a working version! There was an issues with the \'s for the Drill Down. Instead of passing just the value, WF was passing value&\R= . Not sure if this was related to passing more parameters than the GUI supports(9).

After changing the drill down to 1 long line, it was just a few changes in the Detail WHERE statements before the report was working.


Thanks for all your tips and suggestions everyone!

This message has been edited. Last edited by: Nicholas Spyrison,


_____
WF 8.1.04
Win 7// Windows Server 2012 R2
SASS OLAP Cube