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] Question about embedded procedures and computed values

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Question about embedded procedures and computed values
 Login/Join
 
Virtuoso
posted
I discovered the new embedded procedures that the Report painter now generates, and that seems a really cool feature!

I'm having a little trouble wrapping my head around something though. I have a dropdown list that I need to fill with values and descriptions, where the descriptions should be computed from the concatenation of two fields!

I have no trouble creating code that generates said output in the console, but I can't make the dropdown box pick up those values...

My embedded procedure looks like this:
DEFINE FILE warhousp
 NAM/A40 = WHWARC | ' - ' | WHDWHS
END
TABLE FILE warhousp
 BY NAM
 BY WHWARC
-*insert_filters_here
ON TABLE PCHOLD FORMAT XML
END


In the above, NAM should be used for the descriptions and WHWARC for the values.

I changed the data_info tag to use:
datafield="WHWARC"
ibiformat="A2"
displayfield="NAM"
dfformat="A40"


Yet, the dropdown stays empty. It works if I just use WHDWHS for the displayfield attribute though...

So what am I doing wrong here?
How do you debug these embedded procedures?

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


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Master
posted Hide Post
3 things...

-1-
When using a define in an embedded proc.
If you click the [...] button to select the display value, your NAM field will probably not show.
I think because WF firstly refers to the master, not to the show code.

At least in my experience,
I couldn't get this to work either.. ..and I also tried a compute in the procedure.

-2-
You have 2 BY fields.
I think one should be a sum like WF generates the code itself.
SUM FST.NAM
BY WHWARC
( not sure.. )

-3-
Only way I could get this to work is use external procedure.
In my opinion far better.
Better for maintenance.
Better for testing/debugging.
Better for reusability.


You could copy-paste the code to the console to test / debug by the way.

G'luck.
Not much of a solution, just some things I ran into.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
I solved this by adding a define to our local master file.

Originally we feared that such defines would get overwritten as soon as we'd refresh the synonym from our database server, but it turns out WF merges the defines back in nicely! No need to worry about that Smiler


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
I'd be careful about the DEFINE's in the Masters. Behaviour in v7.6.5:

Right-click > Refresh Synonym: The DEFINE is kept.

Create Synonym > Overwrite existing synonyms: The DEFINE is not kept.


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     [SOLVED] Question about embedded procedures and computed values

Copyright © 1996-2020 Information Builders