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 have a define that has the following statement and it does not return the correct results.
RPT_FLAG/A1 = IF (STATUS_FLAG EQ 'P') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 'Y' ELSE IF (STATUS_FLAG EQ 'X') AND (NEXT_BILL_ID NE ' ') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 'Y' ELSE 'N';
The second part of the if then else logic is returning an 'N' when it should be a 'Y'. I need the RPT_FLAG to return a 'Y' if the first if then else logic is met OR if the second if then else logic is met.This message has been edited. Last edited by: Michele Brooks,
The syntax looks correct (I rearranged the clauses slightly):
RPT_FLAG/A1 =
IF (STATUS_FLAG EQ 'P') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 'Y'
ELSE IF (STATUS_FLAG EQ 'X') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') AND (NEXT_BILL_ID NE ' ') THEN 'Y'
ELSE 'N';
Perhaps one or more of the values are null and not blank as you're expecting.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
You should print out each of the fields and verify their values. MISSING data may be part of the issue, and as it is a DEFINE the verb (PRINT vs SUM) may also come into play.This message has been edited. Last edited by: TexasStingray,
RPT_FLAG/A1 = IF (STATUS_FLAG EQ 'P') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 'Y' ELSE IF (STATUS_FLAG EQ 'X') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') AND (NEXT_BILL_ID NE ' ') THEN 'Y' ELSE 'N';
I did that. That is how I could tell that the logic was not working correctly. Francis' suggestion solved the problem. Thank you.
You are the best. Your logic worked. I would have never thought of rearranging my logic. Pasted below is my alternative method, a bit lengthy but it also works. Thanks so much. I hate to have more code than necessary is my programs. I was close this case as [SOLVED]. Thanks again.
REPORTABLE_FLAG_P/I4 = IF (STATUS_FLAG EQ 'P') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 1 ELSE 0; REPORTABLE_BILL_FLAG_X/I4 = IF (STATUS_FLAG EQ 'X') AND (NEXT_BILL_ID NE ' ') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 1 ELSE 0; REPT_BILL_FLAG/I4 = REPORTABLE_BILL_FLAG_P + REPORTABLE_BILL_FLAG_X; REPORTABLE_BILL_FLAG/A1 = IF REPT_BILL_FLAG NE 0 THEN 'Y' ELSE 'N';
quote:
Originally posted by Francis Mariani: The syntax looks correct (I rearranged the clauses slightly):
RPT_FLAG/A1 =
IF (STATUS_FLAG EQ 'P') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') THEN 'Y'
ELSE IF (STATUS_FLAG EQ 'X') AND (INVOICE_DATE NE ' ') AND (SEND_STATUS EQ ' ') AND (NEXT_BILL_ID NE ' ') THEN 'Y'
ELSE 'N';
Perhaps one or more of the values are null and not blank as you're expecting.