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     Fill dropdownlist dynamicly with procedure [SOLVED?]

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Fill dropdownlist dynamicly with procedure [SOLVED?]
 Login/Join
 
Member
posted
I know how to fill the dropdown from a procedure.

I'am missing some information overhere, is there anyway
to assign a dynamic default value in a procedure?

F.e.:
-*procedure retrieves months and month description from a data base.
-*the currentmonth should be the default selected month
DEFINE FILE CALDAT8
MONTHDESC/Mtr = DATECVT(DATE8, 'I8YYMD', 'MDY');
SELECTED/A8 = IF CFCMNT EQ &DATEM THEN 'Selected' ELSE '';
END
TABLE FILE CALDAT8
SUM
MONTHDESC NOPRINT
FST.SELECTED AS 'SELECTED'
BY CFCMNT
BY MONTHDESC
WHERE CFCYEA EQ 9;
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
END


I know the solution of !IBI.AMP.[File], but in this case the HTML code should be changed.

Regards,
Atilla

This message has been edited. Last edited by: Atilla,


Member of Benelux
Usergroup
 
Posts: 20 | Registered: November 02, 2006Report This Post
Expert
posted Hide Post
If you are developing using the GUI HTML Layout Painter tool, in the Parameter tab for the drop-down box there is a "Selected Value" field where you can type the value you want to have selected by default.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Hello Francis,
I am familiar with this option, but as you can see I want to dynamicly select the right value. The selected value which you refer to is a fixed value or ...

Any other suggestions?

Regards,
Ruud


Member of Benelux
Usergroup
 
Posts: 20 | Registered: November 02, 2006Report This Post
Expert
posted Hide Post
Dynamically based on what criteria?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
On the current month:

SELECTED/A8 = IF CFCMNT EQ &DATEM THEN 'Selected' ELSE '';


Member of Benelux
Usergroup
 
Posts: 20 | Registered: November 02, 2006Report This Post
Expert
posted Hide Post
If you examine the HTML code in HTML Layout Painter, you will see
//add onInitialUpdate() function to make changes before initial run of the reports


Change that particular line to
onInitialUpdate();

Then add the following code after the line
//End function window_onload


function onInitialUpdate()
{
var currDate = new Date(); // Retrieve today's date
document.form2.month.selectedIndex = currDate.getMonth(); // Select the current month, In JS, 0=Jan, 1=Feb, etc
}


The above code selects the current month and will work if there are 12 options in chronological sequence, Jan-Dec.

If the select list box is a list of months, you don't need to make it a dynamic list, keep it static and add the 12 values.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
document.form2.month.selectedIndex
I should state that the form name "form2" and select list box name "month" should be the names you've selected.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
quote:
document.form2.month.selectedIndex
.... and remember that the index begins from 0 not 1.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Hi Guys,

Thanks for the suggested solution. It did fill in the right month and of course it works fine.

I find it pitty that pre-selecting a value can not be done in the procedure which fills the dropdownlist. My Basic idee: I do not want to write code, but want to use the graphic interface to build my applications

Regards,
Atilla


Member of Benelux
Usergroup
 
Posts: 20 | Registered: November 02, 2006Report This Post
Expert
posted Hide Post
I thought that there was a move to allow preselection of a value within the GUI - or am I mistaken? Confused

If there was an NFR, then it would only be availablke on a more recent release (7.6.10?) and as you haven't shown your signature (have you filled it in?) we do not know what release (let alone platform) that you use.

Best recourse is to contact your local rep or tech support and either, determine whether there is this function and in what release, or raise an NFR (or add your name to one in existance?) if it is an important feature for you.

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
quote:
I do not want to write code, but want to use the graphic interface to build my applications

You are seriously limiting yourself.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
quote:
You are seriously limiting yourself.

Yes, painfully limited. Thanks for the codes above, Francis. I just had the first taste of raw meat, yummy.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Member
posted Hide Post
Hi Guys,

I can write and understand more then 12 different programming languages. Also I can understand that sometimes we have to write some code, for rare features.

But I have to be realistic: We made the step from 4GL to graphical design, but we still have to program in 3GL?

Just one question: Do you all now how to write assembler. I do not think that most of today's programs are written in it.

So again (and with an additional remark):
I do not want to write code for simple instructions, which should be default available.
Like: Assign a default value (within a fex) for the dropdown, when filling a dropdown through this fex.

And for all: Just want to make our world better en simple, simple features can help, isn't it?

Thanks for the discussion.

Regards,
Atilla


Member of Benelux
Usergroup
 
Posts: 20 | Registered: November 02, 2006Report This Post
Expert
posted Hide Post
quote:
Do you all now how to write assembler
Yes, although I do not advertise it now-a-days - I have also programmed in hex and written OS routines, but less of the chest beating.

A fair many companies are trying to move to wholly GUI and this will probably bring them a fair few improvments, but (to be realistic) most GUIs still produce a vast amount of bloatware that can be improved dramatically by a few seasoned people.

As I am sure you know and realise, most (if not all?) GUI systems move through their life gaining from end user input. These improvements are heralded as new features in new releases - which is why I mentioned that I seem to remember comment about this fairly recently as an NFR and that it would be a good idea to contact your local sales or tech support to get the official line on whether this has been requested.

Anyone on 7.6.10 who can ratify?

Keep smiling and pillaging Wink

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
And you can't really compare Assembler and FOCUS code, one has to be compiled... the other does not (there are probably some technical terms I could insert here if I knew what they were...)


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
yeah, like one has to be key-punched...the other...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Technical term for what happens to FOCUS code: Interpreted


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Thanks Ginny!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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     Fill dropdownlist dynamicly with procedure [SOLVED?]

Copyright © 1996-2020 Information Builders