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.
I've got a sql query that is designed to take parameters if entered but also account for null values and therefore return a complete result set. The query works as expected in SQL Navigator however upon running the query in WebFocus via the SQL Wizard there are no results returned. I've seen similar issues where the SQL Wizard in WebFocus doesn't seem to agree with the syntax however this time I'm unable to get around it. Any suggestions?This message has been edited. Last edited by: Tamra,
Thanks for the info, unfortunately it doesn't seem to be working. I still receive 0 rows with the set statement.
My query is something like this: ENGINE SQLORA SET DEFAULT_CONNECTION KNP2.fmr.com SQL SQLORA PREPARE SQLOUT FOR select country, car, model from db.car where country='USA' and ((car = &invar) or (&invar is null) or (&invar = '')) and ((model = &invar2) or (&invar2 is null) or (&invar2 = ''))
What I'm trying to get at is to allow the user to filter the results on any number of parameters as they wish but also not be required to enter them.
The key is to set the variables (&invar and &invar2) equal to 'FOC_NONE' if the user doesn't enter a value (or the variables are null). Try this and see if it helps:
-SET &INVAR = IF &INVAR NE '' THEN &INVAR ELSE 'FOC_NONE'; -SET &INVAR2 = IF &INVAR NE '' THEN &INVAR2 ELSE 'FOC_NONE';
ENGINE SQLORA SET DEFAULT_CONNECTION KNP2.fmr.com SQL SQLORA PREPARE SQLOUT FOR select country, car, model from db.car where country = 'USA' and car = &invar and model = &invar2 END
If the variable is equal to 'FOC_NONE', then it would be the same thing as completely deleting the line from the query. So you should get all cars or all models, depending on the situation. Hope this helps.
I'm not sure if this is expected or due to the design of my procedure however in order to create the SQLOUT report I had to set a default for the variables in Dialogue Manager first then insert the set statements you mentioned. Upon running the report and being prompted for parameter values I removed the default values and found it worked! The report returned all the data! Thanks so much for your help!
So what is the value of &invar if user leave input field blank? "FOC_NONE", NULL, ''? I have similar issue and you suggestion worked, but now when i reference a computer field in my report with the input field, when report runs it says the compute field does not exist.
Rules for a Multiselect List of Values Selecting Values for Multiselect Variables Internal Processing of _FOC_NULL Internal Processing of FOC_NONE Internal Processing of Select All
Hope this helps to clear up a few things.
Thank your for participating in the Focal Point Forum, Tamra Colangelo Focal Point Moderator Information Builders
WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
Posts: 487 | Location: Toronto | Registered: June 23, 2009