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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Defining a field
 Login/Join
 
Member
posted
Silly question but I cant find resolution to this.

I take fields/parms from a html page and import into webfocus and run a report.

if the fields are not populated on html then the webfocus seems to have an issue

I have fields XCODE1 thru 10 which come from Html. Each field is populated (drop down flds) is a 6 char string which must be unwrapped into 2 seperate fields TYPE1 AND CODE1 etc.
I use the subsrtr to get these two fields if XCODE is gt ' '.

Now here is the thing - if XCODE2 is not populated (selected) it does not seem to be picked up from the HTML and causes an error, because TYPE2 and CODE2 etc are only built by the substr cmd.


How do I define a field ahead of the test to rebuild/populate them via the test if XCODE GT ' ' then CODE1 = substr... and CODE2 = substr...

If you catch my drift.



If typ
 
Posts: 8 | Location: White Plains | Registered: June 20, 2005Report This Post
Expert
posted Hide Post
This is normal behaviour for HTML forms.

I would add -DEFAULT statements to the top of my FOCEXEC.

-DEFAULT &XCODE2 = '';

Then, if the field is passed you will have a value to SUBSTR with, if it is not passed, it will default to blank.


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
Virtuoso
posted Hide Post
Have you tried setting a default value in the fex itself or checking for the length of the existence of the data first. Heres a snippit from when we do a fex that expects parameters looking for the existence:
-SET &SIDLIST  = IF &SIDLIST.EXIST NE 0 THEN &SIDLIST ELSE 'HOLD';
-SET &SORTBY   = IF &SORTBY.EXIST NE 0 THEN &SORTBY ELSE 'Z';
-SET &BYFIELD  = IF &SORTBY EQ 'A' THEN 'STU_NAME' ELSE 'AD260';
-SET &ADDR     = IF &ADDR.EXIST NE 0 THEN &ADDR ELSE 'PLB';


I don't do a lot of dialog manager, but hope it helps


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Member
posted Hide Post
Thanks for replying the DEFAULT &(fld name)
worked a dream.
 
Posts: 8 | Location: White Plains | Registered: June 20, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders