Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Help needed in debugging WebFOCUS "script" - nested IFDEFs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Help needed in debugging WebFOCUS "script" - nested IFDEFs
 Login/Join
 
Expert
posted
This code might be overkill, but I thought it was syntactically correct, but when I put it in site.wfs, it brought down the web server.

Anyone have any ideas on either fixing this or simplifying it?

If IBIMR_user exists - pass it, if IBIC_user exists - pass it, otherwise make IBIC_user equal to IBIMR_user
else
If IBIC_user exists - pass it, if IBIMR_user exists - pass it, otherwise make IBIMR_user equal to IBIC_user
else
Set IBIMR_user to "test" and set IBIC_user to "test".

<IFDEF> IBIMR_user
    <set> IBIMR_user = &IBIMR_user (pass)
        <SENDVAR>
            IBIMR_user_found = 'true 1'
        <ENDSENDVAR>
    <IFDEF> IBIC_user
        <set> IBIC_user = &IBIC_user (pass)
        <SENDVAR>
            IBIC_user_found = 'true 1'
        <ENDSENDVAR>
    <ELSE>
        <SENDVAR>
            IBIC_user = &IBIMR_user
            IBIC_user_found = 'false 1'
        <ENDSENDVAR>
    <ENDIF>
<ELSE>
<IFDEF> IBIC_user
    <set> IBIC_user    = &IBIC_user (pass)
        <SENDVAR>
            IBIC_user_found = 'true 2'
        <ENDSENDVAR>
    <IFDEF> IBIMR_user
        <set> IBIMR_user = &IBIMR_user (pass)
        <SENDVAR>
            IBIMR_user_found = 'true 2'
        <ENDSENDVAR>
    <ELSE>
        <SENDVAR>
            IBIMR_user = &IBIC_user
            IBIMR_user_found = 'false 2'
        <ENDSENDVAR>
    <ENDIF>
<ELSE>
    <SENDVAR>
        IBIC_user = test
        IBIMR_user = test
        IBIC_user_found = 'false 3'
        IBIMR_user_found = 'false 3'
    <ENDSENDVAR>
<ENDIF>

This message has been edited. Last edited by: Francis Mariani,


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Your code appears to be much more complicated than it needs to be:

<IFDEF> IBIMR_user
  IBIMR_user_found = 'true 1'
  <IFDEF> IBIC_user
    IBIC_user_found = 'true 1'
  <ELSE>
    IBIC_user = &IBIMR_user
    IBIC_user_found = 'false 1'
  <ENDIF>
<ELSE>

<IFDEF> IBIC_user
  IBIC_user_found = 'true 2'
  <IFDEF> IBIMR_user
    IBIMR_user_found = 'true 2'
  <ELSE>
    IBIMR_user = &IBIC_user
    IBIMR_user_found = 'false 2'
  <ENDIF>
<ELSE>
  IBIC_user = test
  IBIMR_user = test
  IBIC_user_found = 'false 3'
  IBIMR_user_found = 'false 3'
<ENDIF>

<SET> IBIMR_user (pass)
<SET> IBIC_user (pass)
<SET> IBIC_user_found (pass)
<SET> IBIMR_user_found (pass)



Try the above which should be much easier to read and does the same thing.

Also, when setting values ' are not needed. The values will actually include the ' marks.


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
Expert
posted Hide Post
Doug,

Thanks for simplifying the code.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I'm glad it worked for you!


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


 
Posts: 203 | Registered: November 19, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Help needed in debugging WebFOCUS "script" - nested IFDEFs

Copyright © 1996-2020 Information Builders