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.
Is there any way to get a single blank record returned from a query instead of no records at all? I have some "defines" that I want to appear, even when there are no records that match the WHERE criteria.This message has been edited. Last edited by: Kerry,
If there are no records for the define to work on, then you are out of luck.
If you know that you will not have any records, say the previous TABLE FILE produced zero records, then you may be able to -WRITE a blank record to the HOLD file.
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ 'England'
-*WHERE COUNTRY EQ 'ENGLAND'
ON TABLE HOLD AS TMP_CTY FORMAT ALPHA
END
-RUN
-IF &LINES GT 0 THEN GOTO NO_PRIME ;
-WRITE TMP_CTY
-RUN
-NO_PRIME
DEFINE FILE TMP_CTY
Error/A10 = IF COUNTRY EQ ' ' THEN 'Error' ELSE 'OK' ;
END
TABLE FILE TMP_CTY
PRINT COUNTRY Error
END
Good point Waz... What was I thinking... Or was I? Which brings me back to my original questions: Why do you want to do this? And, can you duplicate this with the CAR File?
Basically: you need to work with something (as Waz pointed out) even if it's &RECORDS or &LINES...
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I'm displaying HTML input tags for data entry. When it meets the criteria, there will be a value displayed. But it would be great to be able to handle "new" entries in the same call, maybe by modifying one of these defines?
DEFINE FILE CAR
CTYFLD/A300 = '<input type="text" name="country" value="'||COUNTRY||'" />';
CARFLD/A300 = '<input type="text" name="car" value="'||CAR||'" />';
END
TABLE FILE CAR
PRINT
CTYFLD AS 'Country' OVER
CARFLD AS 'Car'
WHERE COUNTRY EQ 'ENGLAND' AND CAR EQ 'JAGUAR'
ON TABLE SET PAGE-NUM NOLEAD
END
SET EMPTYREPORT=ANSI
TABLE FILE CAR
PRINT
COUNTRY
CAR
WHERE COUNTRY EQ 'England_1'
ON TABLE HOLD AS HLD_1 FORMAT ALPHA
END
-RUN
-*? STAT
-*?FF HLD_1
DEFINE FILE HLD_1
CTYFLD/A300 = '<input type="text" name="country" value="'||COUNTRY||'" />';
CARFLD/A300 = '<input type="text" name="car" value="'||CAR||'" />';
END
TABLE FILE HLD_1
PRINT
CTYFLD AS 'Country' OVER
CARFLD AS 'Car'
ON TABLE SET PAGE-NUM NOLEAD
END
-EXIT
Ram Prasad E and AlexU: Yeah! Awesome! I know there are other, more inefficient ways of doing what I wanted, but I didn't want to have to duplicate a bunch of code just for a blank set of fields. Thanks a ton.