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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]app studio, html, selecting fex to call

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]app studio, html, selecting fex to call
 Login/Join
 
Virtuoso
posted
I would like to set up a launch page where the user selects one of a list of reports to run (from a dropdown). The selection will affect the display of filters, to correspond to the report currently selected.

On submit, I want the page to call the selected fex directly (rather than calling a manager fex that will branch to the respective -INCLUDE). Is there support for dynamically altering the fex to be called on Submit? How does one accomplish that?

This message has been edited. Last edited by: <Emily McAllister>,
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Interesting topic.

Not that I have any insight, but I am currently working on a front end that uses a "manager" fex as you mention.

Only other option is having multiple submit buttons with JS, but that could get messy.

I would be interested on other suggestions as well.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
If the report fex files are in Repository, you are restricted to static -INCLUDE references (as some FocalPointers have discovered the hard way), since WF Client has to locate the -INCLUDE references in a static analysis of the code, and ship them (in EX -LINES form) as part of the script submitted to WFRS. So if there are 10 reports in the repertoire of the "manager" fex, all 10 report fexes (and any secondary -INCLUDES as well) have to be processed by Client even though only one will be executed.

That's why I felt it may be worthwhile to complexify the HTML a bit so as to avoid that run-time overhead, if response time is crucial.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I have just come up with a way to retrieve a fex from the repository and write it out and then -INCLUDE it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Depending on the number of FEXs in your dropdown you should be able to create separate Requests/Tasks in App Studio and then code the submit button to call the correct task based on the report selected.

I used to do this in Javascript and DOM in 77, but the layout changed with App Studio HTML composer - and you can't see the HTML as easily


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
quote:
the page to call the selected fex directly (rather than calling a manager fex that will branch to the respective -INCLUDE).


Hi Jack,

How about interrogating the repository and building the full path statement required from the PRT_PATH value appended to the root?

If I were to guess, I would suggest that this may be to what Waz alludes in his comment above?


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
quote:
create separate Requests/Tasks in App Studio and then code the submit button to call the correct task based on the report selected.


Do all the page's defined Parameters apply to every Task? Is that documented?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
quote:
How about interrogating the repository and building the full path statement required from the PRT_PATH value appended to the root?


Are you saying that the back-end server really can process an -INCLUDE of a file stored in repository?

And what about syntax (like -INCLUDE and -MRNOEDIT) that Client normally transforms?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Silver Member
posted Hide Post
Hi Jack

You can set up a combo box where values are procedures(that is on the settings tab or properties of the combobox). Then you can chain the first combobox to a second. In the chaining properties it will allow you to conditionally set the procedure based on the value of the first combobox. If you cannot figure it out, I think I can walk you through it but send me a private post and we can talk. I do not have remote assist tools anymore. Not working for IB anymore.

Thanks Barry


WebFOCUS 8
Windows, All Outputs
 
Posts: 34 | Registered: September 08, 2015Report This Post
Guru
posted Hide Post
In 8.0.09 at least this process has become easier.

Here is a quick step by step

0. Create the procedures you wish to use on the form
1. Create a frame to put the report output into - I created one using the FEX with the largest number of parameters and let App Studio create the parameter controls for me.
2. Create a combobox or dropdown control to hold the list of the procedures
3. Open the "settings" for the combobox and check the "Values are procedure names" checkbox
4. Add the procedures you wish to list into the combobox using the "New" option and browser
5. Open the "Tasks & Animations" pane and select the task that is associated to your submit button and delete the current request - report1 for me cause I added the parameters the lazy way Wink
6. Add a new request using the "Run Procedures From Control" option and select the combobox/dropdown holding your procedure names
7. As a sanity check open the "Requests & Data Sources" panel and make sure that all your parameters are showing for the procedures you added in step 3.

Run the HTML page and you should be able to choose the procedure to run and parameters will be passed with on JS coding needed.

Hope this helps.

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
Stu:

Sounds good. -- I'm off this week, will try after the 1st.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Barry, Stu:

Thanx, worked like a charm.

Only issue I encountered was, the HTML editor threw an error msg (Unable to open synonym...) for each of the target fexes in turn as I was adding them to the combobox -- obviously unaware of the app path I need. What should we have done to avoid that wrinkle?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Silver Member
posted Hide Post
Hi Jack

You may have to create the HTM page in the application folder that you have the procedures. There is a way to manually add the application folder name in the HTM file. Look for ibiapps_app (? spelling maybe wrong) and just add the application folder there but IB does not want you to manually modify the code in a text editor and as David says "Bad things may happen" so if you do edit the file back it up first then try it.

Have fun and a Happy New Year


WebFOCUS 8
Windows, All Outputs
 
Posts: 34 | Registered: September 08, 2015Report This Post
Guru
posted Hide Post
I've pretty much stopped using app folders now that the security model in WF8 give me such granular control over who can access and run reports in the "Content" section.

I assume that the app folders are in your APP_PATH, but then it just might be an "undocumented feature" of App Studio Wink


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report 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]app studio, html, selecting fex to call

Copyright © 1996-2020 Information Builders