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     Creating a textbox that allows for no values

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Creating a textbox that allows for no values
 Login/Join
 
Platinum Member
posted
I've created a html page that has two text boxes allowing users to enter partial values and retrieve account numbers or account IDs. The code works fine when the boxes are populated; however, it forces users to know at least part of the account numbers. The ideal situation would be for the report to still work when the textboxes are empty. I'm using the code below to generate the report. Appreciate any suggestions. Thanks
Luiz

-SET &LOOKLEN1 = &LOOKVAL1.LENGTH ;
-SET &LOOKLEN2 = &LOOKVAL2.LENGTH ;
-SET &LOOKVAL1 = UPCASE(&LOOKLEN1, &LOOKVAL1, &LOOKVAL1);
-SET &LOOKVAL2 = UPCASE(&LOOKLEN2, &LOOKVAL2, &LOOKVAL2);

-SET &FIELD_MSCUSTID = IF &SHOW_LOOKVAL1 EQ 'SHOW' THEN 'BY ' | '''' | Master_Customer_ID | '''' ELSE '';
-SET &FIELD_CUSTACCID = IF &SHOW_LOOKVAL2 EQ 'SHOW' THEN 'BY ' | '''' | Customer_Account_ID | '''' ELSE '';

TABLE FILE CASH_IDR
SUM
Payment_Amount
BY Billing_Source_System_Code
BY BU_EVP_Code
&FIELD_MSCUSTID
&FIELD_CUSTACCID
ACROSS Posted_Year_and_Month AS 'Month'

WHERE ( Billing_Source_System_Code EQ &BILLSSCD.(OR(FIND Billing_Source_System_Code IN ARCASH_BILLSSY)).);
WHERE ( BU_EVP_Code EQ &BUEVP.(OR(FIND BU_EVP_Code IN ARCASH_BUEVPM)).);

WHERE (Master_Customer_ID CONTAINS '&LOOKVAL1' );
WHERE (Customer_Account_ID CONTAINS '&LOOKVAL2');

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(,,).Select display output.
ON TABLE SET HTMLCSS ON
-INCLUDE ar_stylesheet_corp
END
 
Posts: 117 | Location: Denver | Registered: July 27, 2005Report This Post
Expert
posted Hide Post
quote:
TABLE FILE CASH_IDR
SUM
Payment_Amount
BY Billing_Source_System_Code
BY BU_EVP_Code
&FIELD_MSCUSTID
&FIELD_CUSTACCID
ACROSS Posted_Year_and_Month AS 'Month'

WHERE ( Billing_Source_System_Code EQ &BILLSSCD.(OR(FIND Billing_Source_System_Code IN ARCASH_BILLSSY)).);
WHERE ( BU_EVP_Code EQ &BUEVP.(OR(FIND BU_EVP_Code IN ARCASH_BUEVPM)).);

WHERE (Master_Customer_ID CONTAINS '&LOOKVAL1' );
WHERE (Customer_Account_ID CONTAINS '&LOOKVAL2');

ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(,,).Select display output.
ON TABLE SET HTMLCSS ON
-INCLUDE ar_stylesheet_corp
END


Use Dialogue Manager to branch if BLANK:


TABLE FILE CASH_IDR
SUM
Payment_Amount
BY Billing_Source_System_Code
BY BU_EVP_Code
&FIELD_MSCUSTID
&FIELD_CUSTACCID
ACROSS Posted_Year_and_Month AS 'Month'

WHERE ( Billing_Source_System_Code EQ &BILLSSCD.(OR(FIND Billing_Source_System_Code IN ARCASH_BILLSSY)).);
WHERE ( BU_EVP_Code EQ &BUEVP.(OR(FIND BU_EVP_Code IN ARCASH_BUEVPM)).);


-IF &LOOKVAL1 EQ ' ' GOTO NO_MAST;
WHERE (Master_Customer_ID CONTAINS '&LOOKVAL1' );

-NO_MAST

-IF &LOOKVAL2 EQ ' ' GOTO NO_CUST;
WHERE (Customer_Account_ID CONTAINS '&LOOKVAL2');

-NO_CUST


ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(,,).Select display output.
ON TABLE SET HTMLCSS ON
-INCLUDE ar_stylesheet_corp
END

EDIT: Used the column names instead of the amper variables - OOOPPPSSS

This message has been edited. Last edited by: Tom Flynn,


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<JG>
posted
set defaults using FOC_NONE and wrap the vars in Quotes

-DEFAULTS &LOOKVAL1 = FOC_NONE
-DEFAULTS &LOOKVAL2 = FOC_NONE
-SET &LOOKVAL1 = IF '&LOOKVAL1.EVAL' EQ 'FOC_NONE' THEN 'FOC_NONE'
- ELSE '''' || UPCASE(&LOOKVAL1.LENGTH, &LOOKVAL1, 'A&LOOKVAL1.LENGTH') || '''';
-SET &LOOKVAL2 = IF '&LOOKVAL2.EVAL' EQ 'FOC_NONE' THEN 'FOC_NONE'
- ELSE '''' || UPCASE(&LOOKVAL1.LENGTH, &LOOKVAL2, 'A&LOOKVAL2.LENGTH') || '''';

The WHERE tests then become

WHERE (Master_Customer_ID CONTAINS &LOOKVAL1 );
WHERE (Customer_Account_ID CONTAINS &LOOKVAL2 );

This has the effect of negating the WHERE if the value for the test if FOC_NONE
 
Report This Post
Platinum Member
posted Hide Post
Tom and JG,
Thank you very much for your help in solving this issue. Appreciate it.
Regards,
Luiz
 
Posts: 117 | Location: Denver | Registered: July 27, 2005Report This Post
Expert
posted Hide Post
In the case where the user is filling out a text box on a launch page, if the user erases the default value of the input text box, and clicks the Submit button, the default value will be overridden..
What i found interesting and useful to know is that the .LENGTH of an erased text field is 01, even when it appears to be empty to the user.
And Tom's test, above, works not only when the user has erased the input box but also when the user has left a bunch of blanks in it.




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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Creating a textbox that allows for no values

Copyright © 1996-2020 Information Builders