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] parameter in fex not refreshed

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] parameter in fex not refreshed
 Login/Join
 
Member
posted
Hi,

I have a web appliction which calls focexec via url like this:

_http://host?WFServlet=fign00001

I have in web client the setting _site_profile = -INCLUDE ig1.fex\n

This fex generates a random number like this:
-SET &nounce = ABS( RDUNIF(I1)*10000000);

My problem is I need this number to be unique in each http requests. If I throw several requestes like this:

_http://host?WFServlet=fign00001&par=a
_http://host?WFServlet=fign00002&par=a
_http://host?WFServlet=fign00001&par=a

the nounce varaible has allways the same value in all 3 requests which I don't want.

Is there anyway to force the &nounce variable to always be updated?

Thanks so much for your help.

This message has been edited. Last edited by: <Kathryn Henning>,


7706M
AIX 7.1
HTML
 
Posts: 22 | Location: Portugal | Registered: May 07, 2015Report This Post
Virtuoso
posted Hide Post
quote:
-SET &nounce = ABS( RDUNIF(I1)*10000000);

Look up the syntax of the function.

RDUNIF returns a floating-point value, between 0 and 1. But by specifying an integer format (I1), I believe you are forcing whatever result is computed to then be truncated to an integer, so &nounce will always be zero. Change it to a D format ('D1' will do) and see what happens.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Parameter values get calculated before the report syntax is checked and run.

The only way to get a new value for &nonce is to run the command again, but it will still be the same value in multiple locations if you use it multiple times.

For your example the simplest option would be to concat the parameter with servlet name - thus it would always be unuqie

_http://host?WFServlet=fign00001&par=fign00001|a
_http://host?WFServlet=fign00002&par=fign00002|a
_http://host?WFServlet=fign00001&par=fign00003|a

alternatively you can programatically write out your requests and DEFINE the nonce values as a field name - a tad more complicated but will give you different versions of nonce


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Member
posted Hide Post
@j.gross: THe value is not zero.

@StuBouyer: My solution was to put the focexec name in the nouce with the user and the timestamp. This covers almost all the possibilities.
I thought to pass the nouce value in the request:

_http://host?WFServlet=fign00001?par=a&nounce=123456
_http://host?WFServlet=fign00002?par=a&nounce=78901
_http://host?WFServlet=fign00001?par=a&nounce=53145

So the value would be calculated in web application (javascript) which demands the requestes and then is read in focexec.

Thank you so much.

AS


7706M
AIX 7.1
HTML
 
Posts: 22 | Location: Portugal | Registered: May 07, 2015Report 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] parameter in fex not refreshed

Copyright © 1996-2020 Information Builders