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.
How can I default a dynamic dropdown parameter in an htm file based on the &FOCSECUSER? I have a fex that retrieves the States from a table and that is how I get the States drop down parameter in the html page. Right now I have the Add "ALL" option checked off so that is always the first option. I need to be able to default to say for example: "FL" if &FOCSECUSER is "Gary".This message has been edited. Last edited by: Mikey,
Haven't been tested, but something like this. In a fex, assign a variable to the State you want for the user. Below SET is not the better way to do it, but if you can have it from a TABLE FILE, it will be better:
im not 100% sure if this is the solution Im loking for. What I have now is a parameter for States that is a drop down. I also created a fex that just returns the current user and added that as a hidden parameter. is there a javascript way to say: if user parameter = Gary then State default FL, if user = Jim then State default CA else _FOC_NULL. Also, if Gary runs report and the default is FL, he still needs to be able to see all other states in the drop down so he can change it.
From your fex that returns the current user, assign the default State as well as I shown in my previous post (the DECODE statement). If the default State can be retrieve from a TABLE it's even better. Doing it from the fex it's easier than doing it in JS.
Then the code in onInitialUpdate() function only assign a the selected value for the dropdown. Your dropdown for States must still be filled with your fex that list every States. onInitialUpdate() is ran after all the default are loaded.
Otherwise in JS it may look something like this
function inInitialUpdate()
{
logUsr = IbComposer_getCurrentSelection('HiddenParmLogUser');
if (logUsr == 'Gary')
IbComposer_setCurrentSelection('StateDropList', 'FL', false);
else if (logUsrl == 'Jim')
IbComposer_setCurrentSelection('StateDropList', 'CA', false);
else
IbComposer_setCurrentSelection('StateDropList', '_FOC_NULL', false);
}
But having hard coded user's name it's really not the good thing to do.This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
You can get the userid and put in a default and return it to a hidden control and in onInitialUpdate function you can IbComposer_setCurrentSelection( controlName, IbComposer_getCurrentSelection( hiddenControlNamed), false); if you have any issues open a case and ask for Barry.
Thanks Barry
WebFOCUS 8103, Windows, App Studio
Posts: 80 | Location: NYC | Registered: November 13, 2008
You know that the "SaveSelection" button will only save the selections made by the user from your HTML page ? It is saved into a file which can be then re-opened and have the HTML already filled up with saved values. Each saved file will be located under user's personal folder.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013