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     trying to display multiple usernames

Read-Only Read-Only Topic
Go
Search
Notify
Tools
trying to display multiple usernames
 Login/Join
 
Gold member
posted
TABLE FILE ALL_LOGS
PRINT
LOGIN_DATE
LOGIN_MONTH
LOGIN_YEAR
LOGIN_DAY
LOG_STATE
SORT_DATE
OS_USERNAME
USERNAME
ALPHA_MONTH
MONTH
COMPUTE LCOUNTER/I3 = IF LOG_STATE EQ 'ON' THEN (LAST LCOUNTER + 1) ELSE (LAST LCOUNTER - 1);
COMPUTE ALPHA_MONTH/A3 = EDIT(LOGIN_MONTH);
COMPUTE MAXCURUSER/D3= LCOUNTER;
-*BY LOGIN_DATE
BY USERNAME
BY SORT_DATE NOPRINT
BY LOG_STATE NOPRINT
-*WHERE USERNAME EQ 'LMGS_PROD_APPUSER' OR 'AERO_PROD_APPUSER'
ON TABLE HOLD AS SORTED_LOGS
END
-*
-*
-***************************************************
-* Set up counter for multi users
-***************************************************
-*
-SET &COUNTER=1;
-SET &Multischema=&MASTER_SCHEMA;
-*
-*
-IF &Multischema.EXISTS THEN GOTO CHK4MUTLI ELSE GOTO DONEWMUTLI;
-*
-SET &MMultischema=&Multischema | ' , ' | &Multischema0;
-SET &MMultischema=MAX.&MMultischema;
-TYPE &MMultischema
-*
-*
-SET &Multischema=&Multischemas;

-CHK4MUTLI
-*
-*
-***************************************************
-* Set up output display format
-***************************************************
-*
-*
-IF &MASTER_OPUT EQ 'PPT' THEN GOTO TABLEFLD1;
-IF &MASTER_OPUT EQ 'EXCEL' THEN GOTO TABLEFLD1;
-IF &MASTER_OPUT EQ 'HTML' THEN GOTO GRAPHFLD1;
-*
-***************************************************
-* Run the graph for the full year, multi BA-BU report
-***************************************************
-*
-GRAPHFLD1
-*
GRAPH FILE SORTED_LOGS
-*
-INCLUDE header
-*
SUM
MAX.LCOUNTER AS 'Concurrent Users'
BY USERNAME AS 'User Names'
-*ACROSS LOGIN_MONTH AS 'Month'
ACROSS MONTH COLUMNS JAN AND FEB AND MAR AND APR AND MAY AND JUN AND JUL AND AUG AND SEP AND OCT AND NOV AND DEC
-*WHERE OS_USERNAME GT 2
-*
ON GRAPH SET LOOKGRAPH LINE
-*
-INCLUDE stylegraphyr
-*
-*
-GOTO MUTLIUSERCHK;
-*
-***************************************************
-* Display as Table *
-***************************************************
-*
-TABLEFLD1
-*
TABLE FILE SORTED_LOGS
-*
-INCLUDE header
-*
SUM
MAX.LCOUNTER AS 'Concurrent Users'
BY USERNAME AS 'User Names'
-*ACROSS LOGIN_MONTH AS 'Month'
ACROSS MONTH COLUMNS JAN AND FEB AND MAR AND APR AND MAY AND JUN AND JUL AND AUG AND SEP AND OCT AND NOV AND DEC
-*WHERE OS_USERNAME GT 2
-*
-INCLUDE output1
-*
-*
-GOTO MUTLIUSERCHK;
-*
-*
-***************************************************
-* Looping condition check for multi users *
-***************************************************
-*
-MUTLIUSERCHK
-*
-IF &&Multischemas0.EXISTS NE 1 THEN GOTO OUTLOOP;
-SET &COUNTER= &COUNTER+1;
-REPEAT CHK4MUTLI FOR &COUNTER FROM 2 TO &Multischema0;
-IF &Multischema0 GE 7 THEN GOTO OUTLOOP;
-OUTLOOP
-*
-DONEWMUTLI
-IF &Multischema0.EXISTS NE 1 THEN GOTO SKIPME;
-IF &Multischema0 LT 8 THEN GOTO SKIPME;
-SET &Multischema='Cannot List More Than 7';
-SKIPME
-*
-*
-IF &MASTER_OPUT EQ 'PPT' THEN GOTO NOOPDSPL;
-IF &MASTER_OPUT EQ 'EXCEL' THEN GOTO NOOPDSPL;
-IF &MASTER_OPUT EQ 'HTML' THEN GOTO OPDSPL;
-*
-OPDSPL
-*
-INCLUDE output1
-*
-NOOPDSPL
-*
-***************************************************
-* Display buttons and output format *
-***************************************************
-*
-*
-INCLUDE toggle_button1
-*
-*NCLUDE output1
-*
-EXIT


This does display, however, I only get one value to display only. Any Suggestions?

Thank you.



Production & Development: WebFocus 7.6.4
 
Posts: 50 | Registered: August 20, 2008Report This Post
Virtuoso
posted Hide Post
That is one very confused (or at least confusing) fex:

* There's no END after the GRAPH and TABLE requests. (Is it hidden in
-INCLUDE output1
? What else?)

* The -REPEAT directive appears after the label it references (with no GOTO to bring control there).


Have you looked at the HOLD file to verify that it indeed picks up multiple username values?
If you change GRAPH FILE to TABLE FILE, what do you get?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
I apologize for the missing information. This Fex is basically an include and I didnt put an exit because there is more, but does not really have to do with the issue I am having with this fex.

The output include is just a graph style code.

There are two buttons that allow for graph or table. I put GRAPH FILE because say if the user wanted a graph to be displayed, its there. If not, they would get a table.

I truly dont understand the way the counter is suppose to work. I just tried to follow the direction of coding I looked at and I am looking for guidance on correctly that.

no real different between Table and graph code, just being able to selection one or the other, I'm sure there are shorter ways to do that like another goto statement, but I choose to go this way for now.

So, again if you could help me straighten out the issue with the mutli-user selection field for this because right now, all I get is a single user display. When I check the source code, there are no errors either.



Production & Development: WebFocus 7.6.4
 
Posts: 50 | Registered: August 20, 2008Report This Post
Virtuoso
posted Hide Post
I'm trying to understand your situation. Below is what I think you're trying to do (please correct me if I'm wrong).
- you have an html selection page that will allow you to do a multi-select on a dropdown box containing usernames.
- on this same page there are some more buttons that allow for the selection of the output type as well as a submit button.
- this html page has not been made with the use of the html painter.
- in your fex you try to find out what userid's have been selected.
Correct so far?
If so, then the variables that contain the multiselection are called whatever the control is called on the html page, with a sequence number added to it. So if your html variable is called 'Multischema' you will get at least &Multischema and &Multischema0. The first one is the first value selected and the ...0 contains the number of selected values. If this number is greater than 1 then you will also receive &Multischema1 &Multischema2 ... etc up to the number of selected values.
The way I would process this situation:
-DEFAULT &Multischema = 'All'
-DEFAULT &Multischema0 = 0

...

-IF &Multischema EQ 'All' THEN GOTO NO_MULTI;
FILEDEF CHKMULTI DISK CHKMULTI.DAT
-RUN
-SET &TEL=2;
-WRITE CHKMULTI &Multischema
-LOOP
-IF &TEL GT &Multischema0 THEN GOTO NO_MULTI;
-WRITE CHKMULTI &Multischema.&TEL.
-SET &TEL=&TEL+1;
-GOTO LOOP

-NO_MULTI

...

TABLE FILE ALL_LOGS
PRINT ...
BY ...
WHERE USERNAME IN FILE CHKMULTI;
END

If your situation is different, let us know.

Hope this helps.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Okay Thank you!!

This message has been edited. Last edited by: Mayor,



Production & Development: WebFocus 7.6.4
 
Posts: 50 | Registered: August 20, 2008Report 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     trying to display multiple usernames

Copyright © 1996-2020 Information Builders