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 created a function with 5 parameters. Within the expression editor, the Parm values all show 'No' under the Nulls column. I don't see where I can change that. Parm1 A2 Nulls = No Parm2 A2 Nulls = No Parm3 A2 Nulls = No Parm4 A1 Nulls = No Parm5 A6 Nulls = No
The resulting value is a description defined as A30V The function properties box shows the "Allow Missing Data" box checked. Within the expression editor, the Missing option says "On All" The expression validates with the "Check Expression" button.
Expression: IF (Parm1 EQ 'xx' AND Parm2 EQ '01') THEN 'Desc1' ELSE IF ((Parm1 EQ 'yy' OR 'zz') AND Parm3 EQ '01' AND Parm4 EQ '1' AND Parm5 NE ' ' ) THEN 'Desc2' ELSE IF (Parm1 EQ 'yy' AND Parm3 EQ '02') THEN 'Desc3' ELSE MISSING
Question 1: I want the function to be able to return MISSING (NULL). When I test parm that should return MISSING (NULL), I get two errors: FOC171 Type of missing calculation is not specified on left side: ELSE FOC101 Error in define in masterfile: Funfile
If I change ELSE MISSING to ELSE ' ' (space), it works. If I change it ELSE '' (no space), it also works. I believe '' (no space) is the equivalent of NULL. However, why does the expression validate MISSING, but fail during testing?
Question 2: Since the function checks for spaces in Parm5, I need Parm5 to allow spaces as an input value. When using the Test Function, I cannot leave Parm5 empty, nor can I enter six spaces. Both empty and spaces causes error: FOC295 A value is missing for &Parm5.
I would like all parm values to be allowed to be empty (MISSING/NULL) or spaces. Is that possible?This message has been edited. Last edited by: <Emily McAllister>,
To answer your first question and make MISSING as valid returned value, must do something like this:
DEFINE FILE ABC
RESULT /A30 MISSING ON = IF (Parm1 EQ 'xx' AND Parm2 EQ '01') THEN 'Desc1'
ELSE
IF ((Parm1 EQ 'yy' OR 'zz') AND Parm3 EQ '01' AND Parm4 EQ '1' AND Parm5 NE ' ' ) THEN 'Desc2'
ELSE
IF (Parm1 EQ 'yy' AND Parm3 EQ '02') THEN 'Desc3'
ELSE
MISSING;
END
You also should include your whole function's code here, it may help us. Us the "include code" tag to have the code properly included and displayed (far right button).
As for Q2, it seems that Parm5 is not passed to the function.
Add
-? &
-EXIT
as the first two lines in your function and call the function, you will then see if Parm5 is passed and with which value.This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013