Focal Point
[CLOSED] Passing value to fill a drop down to then filter data for portal

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1397035096

July 13, 2018, 11:37 AM
KellyT
[CLOSED] Passing value to fill a drop down to then filter data for portal
Hello,
I'm struggling here.
I have a user initials I need to pass to my metadata to get the correct fleet numbers. From there I want to populate a drop down with that user's fleets. Then in the portal i want to select a fleet and have it populate the pages with that fleet/user combination information.

Example: user ABC
Fleets that pertain to that user 1,2,3

On my portal I have a banner that will have a drop down box with Fleet: 1,2,3

When I select fleet 2 i want the other two reports on my portal to use the fleet 2 information. At this point I do not need the user initials.


I created a fex with the fleetId as a report variable and then created an HTML file with the combo box. I just need to figure out how to pass in the user initials to pull only their fleet.

THANKS IN ADVANCE.

This message has been edited. Last edited by: FP Mod Chuck,


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 13, 2018, 11:44 AM
FP Mod Chuck
KellyT

Is their initials part of their user ID or how do you figure that out. Is there a lookup table with this info?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
July 13, 2018, 11:58 AM
KellyT
yes their initials are their user id.

When they log into our program list with their user id(initials) it will then pass the initials via nodejs to the webfocus portal address.

From there the initials will then pull the users fleets. There is a stored procedure that I have metadata against to pull the correct fleets per the initials.

I want my portal to have a drop down list of the users fleets. the user can then select the fleet that they want to view. So if they select fleet 2 then the reports on the portal will then populate with the fleet 2 information.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 13, 2018, 12:50 PM
FP Mod Chuck
Kelly

OK. Then you can create a _site_profile fex that can create a hold file in foccache that you can reference in the drop down. The &FOCSECUSER will have the user ID that you can use in the file of the _site_profile fex. The _site_profile is defined in the administration console under Client Settings / General you wour use -INCLUDE appfolder/fexname.fex in that setting.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
July 13, 2018, 12:53 PM
Doug
So, the User's initials and their User Id are the same, right? If so, you can use &FOCSECUSER to get that and the fex used to populate the DDL would use be something like
TABLE FILE Source
BY FLEET
WHERE UERS_ID EQ '&FOCSECUSER.EVAL'
END

July 13, 2018, 01:49 PM
KellyT
Will the &FOCSECUSER work when I pass the username from a program outside of webfocus.

So I'm calling my portal
http:...../FleetDashboard&myparam=userid
passing in the userid/initials (same thing)

or don't i even need to pass in the userid at this point and just use the &FOCSECUSER.

Thank you for your help. I may have a few more questions as I'm testing this to be sure others can use it besides just me being the developer.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 13, 2018, 02:07 PM
Doug
"&FOCSECUSER" is available within WebFOCUS, So, if the DDL is being populated from a fex, then it should be available and work just fine.