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 &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
December 21, 2007, 10:53 AM
Tom Flynn
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)).);
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 - OOOPPPSSSThis message has been edited. Last edited by: Tom Flynn,
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
December 30, 2007, 06:49 PM
Luiz De Assis
Tom and JG, Thank you very much for your help in solving this issue. Appreciate it. Regards, Luiz
January 01, 2008, 06:13 PM
susannah
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