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.
I have a dynamic combo box that reads from a procedure that otuputs to XML. The procedure reads 2 fields from a file, one is the value to be displayed and used and the other is a flag which shows if this is the record to be selected or not.
I found some code on these forums quite a while back which has been working fine. However I have copied this code to another box running the same version of WF and it doesn't work the same and instead populates the combo with all the code that is normaly not shown in the comobo box?
I am sure this method is used quite a bit, so I hope someone can either spot the error in my define or provide me with a version they know works for them?!
DEFINE FILE MARKFILE
D_DROP_DOWN_STR/A120 = IF MARKFILE.SELECTED EQ 'Y' THEN
MARKFILE.TERRITORY || '" selected displaytext="' || MARKFILE.TERRITORY ||'">' || MARKFILE.TERRITORY || '</OPTION>'
ELSE MARKFILE.TERRITORY || '" displaytext="' || MARKFILE.TERRITORY ||'">' || MARKFILE.TERRITORY || '</OPTION>' ;
END
TABLE FILE MARKFILE
PRINT
D_DROP_DOWN_STR
BY D_DROP_DOWN_STR
ON TABLE SET STYLE *
-INCLUDE IBFS:/CFG/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENDefaultTableStyle.sty
TYPE=REPORT,
GRID=OFF,
$
ENDSTYLE
ON TABLE PCHOLD FORMAT XML
ON TABLE NOTOTAL
END
Many thanks
MarkThis message has been edited. Last edited by: mark66,
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006
I'm not sure how the output of this is subsequently used, but if it's supposed to be standalone, the markup is incomplete. A couple other items:
Whay are you bothering with stylesheets if it's just returning an XML file?
You have print field by field, which is going to give you the defined field twice. You're probably not going to want that. That's probably actually the cause of the problem you're seeing.
Try just outputting to format alpha (or PDF) so you can see what is actually being formed in the fields you are using.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I have copied this code to another box running the same version of WF
But this doesn't mean that it is configured the same way. I would hazard a guess that your installation has something that takes your XML and interprets it differently - probably a modified IBIRLSn.js module.
One way you could get a particular element as that selected without having to resort to modifications in IBI code is to resort the output in your fex -
-* Note that this assumes the "SELECTED" value within your file is "Y" or missing OR "N"
DEFINE FILE MARKFILE
END
TABLE FILE MARKFILE
SUM FST.D_DROP_DOWN_STR
BY HIGHEST SELECTED NOPRINT
BY D_DROP_DOWN_STR
ON TABLE PCHOLD FORMAT XML
END
This will effectively bring your selected item to the top of your list (if you don't have the option for "ALL" checked!).
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, 2004
I think that the code I was trying to use had got mixed up and it is not usually possible to set the selected item in an XML file populating a combo box - although our first box did accept the code, even with the incomplete tags!
The code I had been trying to replicate is found in this example. I think the difference here is the html code is being generated in the fex and then passed to the combo box. What I am trying to do is populate the combo box directly with the xlm file as I am not calling a fex first.
Anyway! I have now abandoned trying to set the selected item and have used Tony's method of sorting the data so the selected record is always at the top. Much simpler!
Thanks for you help.
Mark
WebFocus 765. iSeries v5r4
Posts: 175 | Location: England | Registered: April 11, 2006