Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Smart Dropdown Box

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Smart Dropdown Box
 Login/Join
 
Platinum Member
posted
Hi Focals,

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

Christian

This 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
 
Posts: 156 | Location: Essen Germany | Registered: December 02, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 278 | Registered: October 10, 2006Report This Post
Guru
posted Hide Post
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
 
Posts: 278 | Registered: October 10, 2006Report This Post
Expert
posted Hide Post
quote:
Hi Focals


If someone like FOCUS and WebFOCUS, are they considered a Bi-Focal ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
But, more important, "Progressive"?


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
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
 
Posts: 156 | Location: Essen Germany | Registered: December 02, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Smart Dropdown Box

Copyright © 1996-2020 Information Builders