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.
Hi, I need to assign variables dynamically as below. I will get the variable Name and Variable value in 2 different parameters and need to assign the value accordingly.
Autoprompt will want to know about &VAR_VALUE_Fruit though...
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
It is confusing as to where this parameter name is being set dynamically. Is it in a html form or where does this happen. Parameter names should not be set dynamically, the values they contain can be but not the actual parameter name itself.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005
Originally posted by FP Mod Chuck: SridharLakshmipathy
It is confusing as to where this parameter name is being set dynamically. Is it in a html form or where does this happen. Parameter names should not be set dynamically, the values they contain can be but not the actual parameter name itself.
FP Mod Chuck, If you look at my example , you can see &VAR_NAME ='Fruit' i.e. the parameter name is Fruit which will come in VAR_NAME variable.
The real question is : Why do you need this? It will be almost impossible to write code for variables with variable names.
What are you trying to achieve?
Hi Dave, Thank you, but I need to do without auto prompting. Below is the example of what I want to achieve. I will get the dynamic request parameters from java like below. so I need to read variable values from the request params only.
As far as I can see you don't need different variable's name.
Each Appx.fex can use the same variable's name, only the assigned value is important. It doesn't matter that a variable named &MY_VAR contains either a fruit's name, an animal's name or a bird's name. You're making your request too complicated for nothing. If you need to know the content "type" then have one variable to receive the type (VAR_TYPE : fruit, animal, bird) and one for the kind (VAR_VALUE : apple, tiger, pigeon).
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
It looks like you need to determine the "category" of &VAR_NAME before you launch a procedure? Why is that? Not knowing why you want to do this, but here is what I would to with your traffic control logic.
Originally posted by MartinY: As far as I can see you don't need different variable's name.
Each Appx.fex can use the same variable's name, only the assigned value is important. It doesn't matter that a variable named &MY_VAR contains either a fruit's name, an animal's name or a bird's name. You're making your request too complicated for nothing. If you need to know the content "type" then have one variable to receive the type (VAR_TYPE : fruit, animal, bird) and one for the kind (VAR_VALUE : apple, tiger, pigeon).
Hi Martin, I agree but the APP1, APP2 and APP3 applications already built and we have more than 1000 lines of code. I dont want to revisit the 1000 lines of code again to have unique variable name..
Originally posted by Don Garland: It looks like you need to determine the "category" of &VAR_NAME before you launch a procedure? Why is that? Not knowing why you want to do this, but here is what I would to with your traffic control logic.
general.fex ################
-GOTO &VAR_NAME
-APP1 -INCLUDE APP1 -GOTO ENDAPP
-APP2 -INCLUDE APP2 -GOTO ENDAPP
-APP3 -INCLUDE APP3
-ENDAPP
Hi Don, We are not only routing the fex traffic based on the category, we need to assign the variable values dynamically
Hi Don, We are not only routing the fex traffic based on the category, we need to assign the variable values dynamically
Right, but isn't it true, that once you've determined the category (app name) then you know what variable names must exist to make that work?
Hi Don, Yes, we shall be able to identify the category and list of variables used in it . if so we need use -SET DEFAULTH for all variables used in all apps .
-SET DEFAULTH for all variables used in all apps .
There are couple of ways to approach the DEFAULT(H) issue.
1. Right click on the procedures and set the Prompt for Parameters to 'NO'.
2. If you need default values for your parameters, then create an include file that has all of the variable names and their defaults and add that to the top of your procedures. You can set defaults for all the variables you want, even if you don't use them and it's a great way to keep track of all the variables that you create.