my aim is to build an editable html table. And i have a column with 4 possible values. I want to change these values with a dropdown box which is prefilled with a value. Now i am looking for a way to populte the other possibilities in the drop down box for each row. Hope this is not to confusing!!!
TABLE FILE CAR
PRINT
COMPUTE CAR/A800='<input type="text" name="DATE3" onblur="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeypress="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeyup="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" value="'||CAR||'" >'; AS 'Marke'
COMPUTE MODEL/A800='<input type="text" name="DATE4" onblur="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeypress="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeyup="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" value="'||MODEL||'" >'; AS 'Model'
COMPUTE BODYTYPE/A800='<input type="text" name="VERTEILERLISTE" onblur="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeypress="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeyup="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" value="'||BODYTYPE||'" >'; AS 'Type'
-*COMPUTE BODYTYPE/A400=IF BODYTYPE EQ &BODYTYPE.&I1 THEN '<SELECT id="R" name="R">'|| '<OPTION value=Value1 selected displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value2 displaytext="'|| &BODYTYPE.&I1 || '">'|| &BODYTYPE.&I1 || '</OPTION>'|| '<OPTION value=Value3 displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value4 displaytext="'|| FTOA(DEALER_COST,'(D12)','A16') || '">'|| FTOA(DEALER_COST,'(D12)','A14') || '</OPTION></SELECT>' ; AS 'test'
COMPUTE BODYTYPE/A400='<SELECT id="R" name="R">'|| '<OPTION value=Value1 selected displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value2 displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value3 displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value4 displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION></SELECT>' ; AS 'test'
-*-EXIT
-*ON TABLE SUBFOOT
ON TABLE SET LINES 99999
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD AS DETAIL FORMAT HTMTABLE
-*ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
GRID=OFF,$
BACKCOLOR=RGB(123 159 209),$
TYPE=REPORT, BACKCOLOR=RGB(123 159 209),$
-*TYPE=TABFOOTING, JUSTIFY=RIGHT,$
ENDSTYLE
-*- ? &
-*-EXIT
END
Thanks to all
ChristianThis message has been edited. Last edited by: Kerry,
WF Production Version: 7.7.02M WF Test Version: 7.7.02M Developer Studio: 7.7.02 HTML, EXL2K, FLEX, PDF,PPT
May 15, 2012, 02:54 PM
Fernando
Christian, I see your drop down. I see that it always contains the same value repeated. I am guessing that you do not want that, but want each unique bodytype.
If that is the case then try the following. In a separate query build the html for the drop down and -READ it into the the next query.
Fernando
Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
May 15, 2012, 03:59 PM
Fernando
Here is the code:
TABLE FILE CAR
SUM
COMPUTE BODYTYPE2/A100='<OPTION value="' || BODYTYPE || '" displaytext="'|| BODYTYPE || '">' || BODYTYPE || '</OPTION>';
BY BODYTYPE NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE AS FB1 FORMAT ALPHA
END
-RUN
-SET &BLINES=&LINES;
-REPEAT BLIST1 FOR &I FROM 1 TO &BLINES STEP 1;
-READ FB1 NOCLOSE &B&I.EVAL.A100.
-SET &B&I.EVAL=TRUNCATE('&B&I.EVAL.EVAL');
-BLIST1
-RUN
-CLOSE FB1
TABLE FILE CAR
PRINT
COMPUTE CAR/A800='<input type="text" name="DATE3" onblur="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeypress="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeyup="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" value="'||CAR||'" >'; AS 'Marke'
COMPUTE MODEL/A800='<input type="text" name="DATE4" onblur="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeypress="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeyup="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" value="'||MODEL||'" >'; AS 'Model'
COMPUTE BODYTYPE/A800='<input type="text" name="VERTEILERLISTE" onblur="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeypress="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" onkeyup="return window.parent.alpha(event,window.parent.letters+window.parent.numbers+window.parent.signs+window.parent.mathsigns+window.parent.custom);" value="'||BODYTYPE||'" >'; AS 'Type'
-*COMPUTE BODYTYPE/A400=IF BODYTYPE EQ &BODYTYPE.&I1 THEN '<SELECT id="R" name="R">'|| '<OPTION value=Value1 selected displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value2 displaytext="'|| &BODYTYPE.&I1 || '">'|| &BODYTYPE.&I1 || '</OPTION>'|| '<OPTION value=Value3 displaytext="'|| BODYTYPE || '">'|| BODYTYPE || '</OPTION>'|| '<OPTION value=Value4 displaytext="'|| FTOA(DEALER_COST,'(D12)','A16') || '">'|| FTOA(DEALER_COST,'(D12)','A14') || '</OPTION></SELECT>' ; AS 'test'
COMPUTE BODYTYPE2/A4000='<SELECT id="R" name="R">' ||
-* Handle options
-REPEAT BLIST2 FOR &I FROM 1 TO &BLINES STEP 1;
'&B&I.EVAL.EVAL' ||
-BLIST2
'</SELECT>' ; AS 'test'
-*ON TABLE SUBFOOT
ON TABLE SET LINES 99999
ON TABLE SET PAGE NOLEAD
ON TABLE PCHOLD AS DETAIL FORMAT HTMTABLE
-*ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
GRID=OFF,$
BACKCOLOR=RGB(123 159 209),$
TYPE=REPORT, BACKCOLOR=RGB(123 159 209),$
-*TYPE=TABFOOTING, JUSTIFY=RIGHT,$
ENDSTYLE
END
Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
May 15, 2012, 05:43 PM
Waz
quote:
Hi Focals
If someone like FOCUS and WebFOCUS, are they considered a Bi-Focal ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
May 15, 2012, 07:27 PM
j.gross
But, more important, "Progressive"?
- Jack Gross WF through 8.1.05
May 16, 2012, 02:11 AM
ChristianP
Hi Fernando and all other BI-Focals,
thanks for your solution!! It is quite close to my needs. The problem is that the column in this case test is prefilled with a value let,s say sedan or convertible and i want to be able to change it to the other possibilities.
Thanks
christian
WF Production Version: 7.7.02M WF Test Version: 7.7.02M Developer Studio: 7.7.02 HTML, EXL2K, FLEX, PDF,PPT