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] Passing parms to a Maintan

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Passing parms to a Maintan
 Login/Join
 
Platinum Member
posted
I need to run a Maintain program from a link in a report focexec, and pass two values to position the maintain to the specific record.

In researching the parameter passing business, I found a number of different approaches to retrieving the parameters, and am asking here which is the best method ?


1) IWC.GetAppCgiValue("InputName")

2) Sys_Mgr.Get_NameParm or Sys_Mgr.Get_PositionParm

3) MAINTAIN FILE IBFFCAST FROM CustSelected ProdSelected

and use CustSelected as needed...

Also, any advice on the proper form of the drilldown URL ?

This message has been edited. Last edited by: Dave Ayers,


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Virtuoso
posted Hide Post
Dave,

I'd use the first one, IWC.GetAppCgiValue("param").
This seems to me to be the best way when dealing with url variables.
The drill down url can be constructed from within DevStudio, but if you need to do this manually it will have to contain the command to run the maintain as well as all parameters that are needed to start the maintain in good order as well as the parameters to be passed on to the maintain itself.

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
Master
posted Hide Post
As for the drilldown code, I usually let the report painter build it:

TYPE=DATA,
COLUMN=N1,
URL=/ibi_apps/WFServlet?(xxx=N1 IBIF_cmd='MNTCON EX mnt1' IBIS_passthru='on' IBIS_connect='on' IBIAPP_app='cloop baseapp' IBIC_server='EDASERVE'),
$

Just make sure, that when you use: IWC.GetAppCgiValue("InputName") to get the value that InputName is EXACTLY coded the way it is passed.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Platinum Member
posted Hide Post
Ah, OK I have my maintain running from a drilldown link in a report focexec, and accepting the parameters passed from it. Yea !

Thanks, GamP and Mark !

But I noticed another problem.

When the user is finished doing their updates and clicks the 'Close' button on the form (Mnt. self.WinExit(); handler), the maintain quits, but leaves the browser window open, with a login screen showing.

The user is probably accustomed to closing WebFocus windows with the upper right hand 'x' box. I don't want them doing the same with the maintain window to prevent orphan agents, but I'm sure they will when they get tired of clicking my Close button and then having to dismiss the useless window too.

So, how can I close the Maintain app AND close the browser window programaticly ?

(note: I did do a FP search for this, but nothing worked here)


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Virtuoso
posted Hide Post
Dave,

Under your Close button code the following:
(be sure it is a javascript event handler...)
window.close();
IWCTrigger("WINEXIT");

Type it as shown here, including upper/lower casing.
This should take care of your problem.

Then, there is the possibility that you will get a warning to the effect that the application has been closed. You can prevent this by including the statement MNTCON EXIT_WARNING OFF in your edasprof.prf file.

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
Platinum Member
posted Hide Post
I have tried the

" window.close(); IWCTrigger("WINEXIT"); " (empty browser window remains)

and the

" WINFORM SET form.XBUTTON.FOCUS to here; " (have to click the CLOSE button twice)

closing methods, but neither of them work for me ???

I am getting the Appl. close warning even with a
" Sys_mgr.focset("maintain_warning", "off"); " statement in Top case.

In addition, and more important, when I try to save a record (which is the first communication back to the server after the first Maintain page displays) I get a

" (FOC03847) RESUME: Application previously closed (no context). " error message, and no data is updated.

I have read about adding a random number to the maintain startup URL to control caching, but this maintain is started from a drilldown in a report focexec, in the form:

TYPE=DATA,
COLUMN=N4,
TARGET='_blank',
URL=/ibi_apps/WFServlet?(CustSelected=N1 ProdSelected=N4 IBIF_cmd='MNTCON RUN ibfprdfc' IBIS_passthru='on' IBIS_connect='on' IBIAPP_app='appdir baseapp' IBIC_server='EDASERVE'),
$

I can't see a way to add the random number to this drilldown link, or how to convert it to Javascript to use the exiting methods for that purpose.

I have a suspicion that this might be related to the closing problems, at least the FOC03847 error. (anyone know why that is the same error number for a Mnt. compile error ? )

While I have found some clues to these problems, here and the doc., they don't paint a full picture and seem to point in different directions. Can someone set me straight on maintain startup URLs and full closing ?

Thanks,


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Virtuoso
posted Hide Post
Dave,

Put in the random number at the reporting level. That way each link in your report is a unique one and you just have to pass on the value of the 'noprint-ed' random number in the drill down.

As for the mntcon warning thing, put this statement in your edasprof file. My guess is that this variable needs to be set BEFORE the maintain starts. What you describes about the window behavior indeed sounds as if the warning has not been effected.

The message about the application previously having been closed very very probably comes form the fact that the maintain screen is displayed out of IE's cache, without ever actually having started the maintain. This is solved by adding the random number....

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
Platinum Member
posted Hide Post
Progress - I changed the order of the close statements to:

IWCTrigger("WINEXIT");
window.close();

and now my maintains seem to close OK, except that I still get the warnings, even with the

Sys_mgr.focset("maintain_warning", "off");

The '(FOC03847) RESUME:...'errors are gone too, with the proper closing. Smiler

Any idea of what's wrong with the maintain_warning ?

And I'd still like to get a better idea of the differences between the various different ways of starting up maintains (drilldowns, vs Javascript URLs).

Thanks,


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Master
posted Hide Post
To get rid of the warning message try this:

Include the statement MNTCON EXIT_WARNING OFF in your edasprof.prf file.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Platinum Member
posted Hide Post
Ok, got the Exit_Warning in the server profile and now I only have to deal with the browsers warning message. It does make me wonder what good the Sys_mgr.focset("maintain_warning", "off"); is, if it doesn't do anything...

But, now all the basics are working and there are only a few little things to cleanup, so I think I can say Thanks to Mark and GamP and put a 'close' to this thread, hoping it can help others down the road.


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 2003Report This Post
Virtuoso
posted Hide Post
Dave,

The browser's warning message can also be stopped. Searching through this forum gave me the answer to that. In the event handler for closing the window, just add the statement
window.opener=self;

just before actually closing the window. This will take care of the message.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
For lurkers and searchers:

The finial solution to getting a clean close from my maintain was to put the following into a Javascript event handler for your 'Close' button on your form.

window.opener='x';
IWCTrigger("WINEXIT");
window.close();

In addition you will need to add an

MNTCON EXIT_WARNING OFF

statement to your servers edasprof.prf file

That's what worked for me !


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
 
Posts: 165 | Location: Detroit Metro | Registered: September 17, 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] Passing parms to a Maintan

Copyright © 1996-2020 Information Builders