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.
Obviously I want Hello printed for the specific employee, but what you get is the name of the variable. Is there a way to EVAL this, so I get the right value?This message has been edited. Last edited by: Kerry,
You can't mix your &variables with define/compute fields like that. You have set a value for a specific variable name - &KEY112847612. That &var is not re-evaluated for every record in your table request so you cannot create another &var based on a specific record, as you're trying to do in your compute. Also EVAL is used with &vars, not real or virtual fields.
There are multiple ways to accomplish what it appears you are trying to do (COMPUTE MSG/A20=IF EMP_ID EQ '&KEY' THEN 'HELLO' ELSE '';) but I don't know if you were looking for a solution to a specific problem or needing a technique to use for some other problem.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
You are trying to concatenate an Amper variable to a field in a tabel request. this will not work.
If you have a list of & variables with some text related to them, then I would suggest writing them to a file and either joining or matching or decoding the values.
Write the file in the format EMP_ID MSG.
e.g.
FILEDEF EMP_LUP DISK emp_lup.ftm
EX -LINES 2 EDAPUT FOCTEMP,EMP_LUP,CV,FILE
112847612 'HELLO'
-RUN
TABLE FILE EMPLOYEE
PRINT DST.EMP_ID
COMPUTE MSG/A20 = DECODE EMP_ID(EMP_LUP ELSE ' ');
END
-* THIS FOCEXEC WORKS FOR &KEY112847612 VALUES UP TO 19 CHARACTERS LONG -SET &KEY112847612 = 'HELLO'; -* ADDING 1 TO THE LENGHT ADDS 1 SPACE TO &KEY112847612 -SET &KEYLEN= &KEY112847612.LENGTH + 1; -* DETERMINE APPROPRIATE FORMAT FOR DEFINED VARIABLE MSG -SET &KEYFORMAT = 'A' | &KEYLEN; DEFINE FILE EMPLOYEE MSG/&KEYFORMAT WITH EMP_ID = SUBSTR(&KEYLEN,'&KEY112847612',1,&KEYLEN,&KEYLEN,MSG); END TABLE FILE EMPLOYEE PRINT DST.EMP_ID COMPUTE MSG/A20 = MSG|EMP_ID; END
-* THIS FOCEXEC WORKS FOR &KEY112847612 VALUES UP TO 19 CHARACTERS LONG
It sounds like he only wants the message to print for a certain pre-determined id - not for all of them. Either reading all the necessary information into amper variables or using a fex to "pre-create" the associations between ID and message, as suggested by Waz, is what you need.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007