Focal Point
[SOLVED] pass changed and varible data with a drilldown

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

October 28, 2008, 06:20 PM
<dksib>
[SOLVED] pass changed and varible data with a drilldown
What I want to do is to be able to pass multiple varibles that has been changed by selecting a checkbox or not so remain with the default data. These varibles will be pasted to a fexexec that would process the varibles.
Here is my current code. I am able to drill and pass the default varibles but it does not pass the changed data based upon the selection.

-DEFAULT &TEST01=08;
-DEFAULT &TEST02=09;
-DEFAULT &TEST03=13;
-DEFAULT &TEST04=14;
-DEFAULT &TEST05=15;

TABLE FILE ADJUSTMENT_FORM_WEEK
PRINT
COMPUTE CNTA/I2 = 1 + LAST CNTA; NOPRINT
COMPUTE CBNAME/A6 = 'TEST' || EDIT(CNTA); NOPRINT
COMPUTE CHK_BB/A100 = '< input type="check box" name="' || CBNAME || '" id="' || CBNAME || '" value="' || EDIT[CNTA) || '" >';
AS 'Select'
BRANCHREPID CLIENTACCOUNTNUMBER CLIENTNAMELASTNAMEFIRSTNAME POSETTLEMENTDATE CGF CONTRIBUTIONADJUSTMENTAMOUNT
SSN_TIN BRANCHREPCORPID BRANCHREPNAME BRANCHREPLOCATION LEADSOURCE INITIALRECDDATE
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE,
$
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9,$
TYPE=TITLE,FIELD=CHK_BB,
STYLE=BOLD,
TARGET='_blank',
FOCEXEC=orders1(TEST01=&TEST01 TEST02=&TEST02 TEST03=&TEST03 TEST04=&TEST04 TEST05=&TEST05),
$
TYPE=TABHEADING, SIZE=12, STYLE=BOLD,$
TYPE=TABFOOTING, SIZE=12, STYLE=BOLD,$
TYPE=HEADING, SIZE=12, STYLE=BOLD,$
TYPE=FOOTING, SIZE=12, STYLE=BOLD,$
TYPE=REPORT, COLUMN=N9, WRAP=6.000000,$
TYPE=REPORT, COLUMN=N3, WRAP=6.000000,$
ENDSTYLE
END


Please note that Checkbox has a space in it otherwise it would give a box. Also, the varibles represent each row from the input table.

This message has been edited. Last edited by: <dksib>,
October 29, 2008, 03:24 AM
Tony A
dksib,
quote:
Checkbox has a space in it otherwise it would give a box
If you enclose your code within [ code] and [/code] (nospaces) then you do not have to make that sort of mod to post on the forum.

I guess that you embed your output into an HTMLFORM (otherwise it won't work)?

More importantly, the reason that you are not getting the changed values from your form is that you are assigning the values in your drill down from your variables at the time the webpage is compiled from your code and not at form submission time. i.e. the hyperlink is predetermined by your code and has no interaction with your HTMLFORM.

The method I would use is to call a javascript function for the drilldown link - even document.form.submit(); may work for you depending upon the rest of your coding requirements.

This code should help you -

TABLE FILE CAR
PRINT COMPUTE CNTA/I2     = 1 + LAST CNTA; NOPRINT
      COMPUTE CBNAME/A6   = 'TEST' || EDIT(CNTA); NOPRINT
      COMPUTE CHK_BB/A100 = '<input type="checkbox" name="TEST'
	                         ||EDIT(CNTA)||'" id="TEST'||EDIT(CNTA)||'" value="'||EDIT(CNTA)||'" />';
                             AS 'Select'
   BY COUNTRY
ON TABLE SET BYDISPLAY ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HTMLFILE FORMAT HTMTABLE
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, ORIENTATION=LANDSCAPE, GRID=OFF, FONT='ARIAL', SIZE=9,$
TYPE=DATA,FIELD=COUNTRY, STYLE=BOLD, JAVASCRIPT=document.form.submit(), $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Demo for dksib</title>
</head>
<body>
<form name="form" action="/ibi_apps/WFServlet" target="_blank">
<input type="hidden" name="IBIF_ex" value="showvars.fex" />
<input type="hidden" name="IBIAPP_app" value="baseapp" />
!IBI.FIL.HTMLFILE;
</form>
</body>
</html>
-HTMLFORM END

The showvars fex just contains "-? &TEST" to display the variables begining with TEST.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
October 29, 2008, 09:37 AM
<dksib>
Tony,

Thanks for the sample. With only a couple of changes it worked perfectly.

David
October 29, 2008, 10:08 AM
Tony A
That's good to know David, glad it helped Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10