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] "IF" validation to run html pages

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] "IF" validation to run html pages
 Login/Join
 
Member
posted
I have a .fex file which I would like to run which will validate a user is in, or not in, a group and direct them to an html file based on the result. If a user is in the group, I want them to see the "tech"(private) page and if not, I would like them to see the other, public, page. Below is what I have:

EX is_member UNAME='REMUSER', GNAME='wg-maximo-wf-users', EPAGE='N'
-IF &LINES GT 0 THEN GOTO PRIVATE ELSE GOTO PUBLIC;


-PRIVATE

-HTMLFORM on-site_tech.htm
-RUN
-DONE

-PUBLIC

-HTMLFORM on-site.htm
-RUN
-DONE


As I am testing this, I am in the group yet I am being directed to the public page. Can anyone help?

Thanks,
Craig

This message has been edited. Last edited by: cevans,
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Platinum Member
posted Hide Post
Hi cevans,

You may want to do a -RUN before your IF statement.

See if that helps.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Member
posted Hide Post
quote:
Originally posted by fatboyjim:

You may want to do a -RUN before your IF statement.



Thanks for the suggestion...no dice though. I got the same result.
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Member
posted Hide Post
I just tried to run the is_member to check my membership in the group and it returned an error. Must be an error in communication with our metagroup app and WebFOCUS b/c it is not registering that I am in the group. I know I am since I am the one who created the group. I will check with those admins.

Thanks
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Platinum Member
posted Hide Post
Hi,

After looking at the code, I'm not sure if DONE is a keyword in WebFOCUS.

You may be looking at to skip to DONE after executing
 
-HTMLFORM on-site_tech.htm
-RUN
 

WITH
  
-GOTO DONE;

After the -RUN

See if that helps.

Best Regards,

Jimmy Pang


DEV: WF 7.6.10
TEST: WF 7.6.10
PROD: WF 7.6.10
MRE: WF 7.6.4
OS/Platform: Windows
Dev Studio: WF 7.7
Output: HTML, EXCEL, PDF, GRAPH, LOTUS, CSV
 
Posts: 117 | Location: Toronto, Ontario, Canada | Registered: February 29, 2008Report This Post
Member
posted Hide Post
Thanks for the ideas but after running the group validation by itself, and failing, I switched the html pages and got the result I predicted. Since I am failing to register as in the group, I am going to the public portion of the file. I changed the tech page to the public portion and it directed me there. This file is working as it should...I just need to get to the bottom of why I am not registering as a member of a group I know I am in.

Thanks.
 
Posts: 23 | Location: ABQ, NM | Registered: August 24, 2009Report This Post
Virtuoso
posted Hide Post
And, as you said before, that is the same as solving the error you get in the is_member procedure.
Need help with that? If so, show us what the code is in the is_member procedure and what error you get. Check if the call to the procedure is correct. I'm assuming here that your code
EX is_member UNAME='REMUSER', GNAME='wg-maximo-wf-users', EPAGE='N'
is just an example, since the 'REMUSER' you pass is just a literal string, not a variable ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
<JG>
posted
Assuming that is_member is working try coding it correctly

EX is_member UNAME='REMUSER', GNAME='wg-maximo-wf-users', EPAGE='N'
-IF &LINES GT 0 THEN GOTO PRIVATE ELSE GOTO PUBLIC;


-PRIVATE

-HTMLFORM on-site_tech.htm

-GOTO EXIT

-PUBLIC

-HTMLFORM on-site.htm

-EXIT
 
Report This Post
Master
posted Hide Post
JG, you still need a -RUN after EX is_member.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Expert
posted Hide Post
-RUN
-SET &WHATPAGE = IF &LINES GT 0 THEN 'on_site_tec.htm' ELSE 'on_site.htm';
-HTMLFORM &WHATPAGE

(might need &WHATPAGE.EVAL)

I hate dashes in names, you must be in windows.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report 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] "IF" validation to run html pages

Copyright © 1996-2020 Information Builders