Focal Point
[CLOSED] WebFOCUS Script Commands - non-system variables

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

July 08, 2010, 05:40 PM
Francis Mariani
[CLOSED] WebFOCUS Script Commands - non-system variables
Can I retrieve non-system and non-HTML header variables using WebFOCUS Script Commands in site.wfs? If so, how? I've tried the usual and (pass) commands on a hidden form variable and I can't get it to work.

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
July 09, 2010, 04:08 AM
GamP
Francis,
Exactly what are you looking for?
Within a browser environment the only things available are what the browser can touch - and that can vary of course by using pieces of add-on code like javascript and ajax and ....
But as a rule, hidden form variables should be passed on to webfocus client and the reporting server.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 12, 2010, 10:59 AM
Francis Mariani
I am working on a POC to unite two different environments onto one server. One application ues MRE security to login and then navigate to a self-service app. Becasue it navigates to an HTM URL, nothing is passed after MRE authentication. I'm hoping to pass a non-system variable to identify the application and trap that variable in site.wfs so I can set the APP PATH.


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
July 13, 2010, 03:27 AM
GamP
What I have done in a similar (but not equal) situation, is capture the url-address itself and act upon that. The url is a standard available http header variable, so there should not be a problem capturing it in the webfocus environment.
In my case it was a question of various customer coming in to the same server and each customer has it's own database which I had to be able to distinguish. By capturing the url (which is slightly different for each customer) I could make this distinction.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 13, 2010, 08:41 AM
dlogan
Francis,
I did a lab at Summit on using the WFS Scripting commands to customize an environment.

It has quite a few examples on ways to get HTTP Header variables, and other WebFOCUS variables. You might find it useful.

It is available here:
http://www.informationbuilders...00771044261580226206


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


July 13, 2010, 08:42 AM
ABT
that doesn't sound very secure. Maybe a more secure (albeit still not very secure) option would be to capture the referrer header. That would be a little more difficult for the casual user to fake.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
July 13, 2010, 10:12 AM
Francis Mariani
There are some good ideas here. I have a reasonable solution too.

The one problem with all of these is that they won't control Dev Studio. So perhaps I require additional stuff for Dev Studio. APPLOCK was proposed along with server profiles for each developer that will use Dev Studio.


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
July 14, 2010, 05:15 PM
Francis Mariani
Mr. Logan,

Thanks very much for informing me about the summit lab. I downloaded the document and gave it a good read-through. From reading some of your example code, I resolved a problem I had with my code - the documentation in the security manual is meagre (pathetic?).

I have trouble with Dev Studio. I need to set an APP PATH based on Data Server Credentials stored in the Dev Studio WebFOCUS Environment settings, but the User ID does not get recognized in site.prf.


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
July 14, 2010, 10:17 PM
dlogan
Ms. Mariani,

What you likely want is something like the following:

<IF> IBIC_user EQ "BOB"
_site_profile=&site_profile\nAPP PREPEND TEST\n
<ENDIF>


With that code its assuming you want that to execute based on if the Reporting Server userid is Bob, and it will map the path to PREPEND Test to the APP PATH (My FOCUS skills are minimal, so hopefully that APP PREPEND statement is correct, but you get the idea).

If you need it specific for DevStudio, I have some code at the very end of that PDF for how to recognize Developer Studio.

If you get stuck getting the logic to work, describe how you would like it to work and open a case with Techsupport. When you open the case include a WFServlet trace of the code running and not working right.

WFS Scripting is usually pretty easy to debug with a WFServlet trace.


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