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] Reading an amper value in a Dynamic list box

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Reading an amper value in a Dynamic list box
 Login/Join
 
Member
posted
Hi everyone,

I've had a quick trawl through the forums and can't find an answer
to this so I'm hoping its an easy one and I'm being dull.

We have data which includes an amper character in the middle of the
populated field. i.e ( AB amper CDEF )
When the dynamic box is populated it shows the characters prior to
the amper character and ignores those after i.e ( AB only )

Any suggestions would be grateful

Thanks

This message has been edited. Last edited by: Madasabear,


Developer Studio Release : 7.6.11
 
Posts: 21 | Location: TataSteel Strip Products UK , Port Talbot , South Wales | Registered: November 28, 2006Report This Post
Expert
posted Hide Post
Angry Bruin,

The reason that is happening is that WF is interpretting it as a variable so you need to fool WF into thinking that it is not!

You could preprocess the data used to populate the combo and use something like STRREP to insert a '|' directly after the & or even change the & to a value of &

I'm sure that you'll receive many other answers to this, and these are just quick thoughts without testing to see if it will work for you.

T

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
Gold member
posted Hide Post
Are you creating the dynamic list from the master. If you create a fex that hold the data as xml and link to that it works fine. I have data with ampersands and they work fine in my list boxes.
for example create a fex called mycar.fex and then when you create a listbox dynamic link to the fex mycar.

TABLE FILE CAR
SUM CAR
BY CAR
ON TABLE PCHOLD FORMAT XML
END


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Expert
posted Hide Post
Mr. Bear,

I don't do WebFOCUS with GUI tools but your quandary prompted me to look into this commonly annoying problem.

This problem occurs when the & is not separated by a space from the next character - WebFOCUS then looks for a Dialogue Manager variable...

Here's a solution to the problem: append a character to the "displayed value" in the dynamic drop-down - this seems to display the value that contains the & (I don't know why this works, but it does). You have to use a procedure to populate the dynamic drop-down.

Here's what I did to test this:

1) Added a DEFINE to the CAR Master, the sample FOCUS database we all use. This is because Information Builders appears to have made sure that no embedded & characters exist in any of their sample databases.

DEFINE COUNTRY1/A10 = STRREP (10, COUNTRY, 1, 'P', 1, '&', 10, 'A10');
(added to the first segment in the CAR Master, replaces the P in JAPAN with a &)

2) Created a procedure that will populate the dynamic drop-down list box, appending an HTML non-breaking space character to the COUNTRY column (the | [pipe] is there to ensure that WebFOCUS doesn't try looking for a DM variable!) - this could be any character:

DEFINE FILE CAR
COUNTRY1A/A20 = COUNTRY1 | '&|nbsp;';
END
TABLE FILE CAR
PRINT
COUNTRY1A
BY COUNTRY1
ON TABLE PCHOLD AS H1 FORMAT XML
END

- COUNTRY1 becomes the option values of the dynamic drop-down list box (the original value)
- COUNTRY1A becomes the option display values of the dynamic drop-down list box (the value with the appended character)

I hope you can use this - two simple steps:
1) Create a procedure that appends a character to the value used in the drop-down list box (ensuring this is the second of the two required fields in the XML HOLD file)
2) Change the HTML Layout Painter Control Data Source to the procedure


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
mrguru, I have found that if the embedded & is not separated from the next character by a space (or a pipe, I imagine) the behaviour will be as Mr. Bear described.

JA&AN will display as JA
JA& AN will display as JA& AN

This is whether or not a procedure is used to populate the drop-down list box.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Oh. My data is separated by a space. Thanks.


WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
 
Posts: 60 | Location: Atlanta, GA | Registered: October 30, 2003Report This Post
Member
posted Hide Post
Many thanks for all your replies , I'll let you know how I get on.
I had already tried the XML version which explains the space quandry.

Thanks again,
Paul

PS for some reason it dropped my name from from the original post ,
but liking the variations on my user name Smiler Smiler


Developer Studio Release : 7.6.11
 
Posts: 21 | Location: TataSteel Strip Products UK , Port Talbot , South Wales | Registered: November 28, 2006Report This Post
Member
posted Hide Post
Me again , Just tested it and it works perfectly.

Thanks Francis for your very clear and distinct advice.

My first post and an excellent response and result ,
as the song goes who could ask for anything more

Good One


Developer Studio Release : 7.6.11
 
Posts: 21 | Location: TataSteel Strip Products UK , Port Talbot , South Wales | Registered: November 28, 2006Report 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] Reading an amper value in a Dynamic list box

Copyright © 1996-2020 Information Builders