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] leading blanks in XML dropdown

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] leading blanks in XML dropdown
 Login/Join
 
Expert
posted
anybody have a clue how to 'indent' in an xml dropdown list? I've googled and gotten \u0020 ,which of course doesn't work.
I'm using leading dots for the time being
'. . . . qtr ending'
but uuuuugly.

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Have you tried    


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
Virtuoso
posted Hide Post
Add some non-breaking spaces like the following?

&|nbsp;&|nbsp;&|nbsp;&|nbsp;


Of course you may need a pipe character after the ampersand due to working with WF....


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
 
Posts: 1113 | Location: USA | Registered: January 27, 2015Report This Post
Virtuoso
posted Hide Post
If it's really XML, then HTML entities are invalid and you need to use   instead of  .

HTML and XML collapse white-space to a single space, which includes space, tab, new-line and line-feed characters. Non-breakable spaces are exempt of that behaviour.

Another option may be to insert a <CDATA! section for the indentation. Not sure if that works 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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
quote:
Originally posted by Francis Mariani:
Have you tried    


oui bien sur. ne marche pas. prints out the characters, same with & # 1 6 0
TABLE FILE CAR BY COUNTRY BY CAR ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END
...
now the job is to get leading spaces on CAR




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
You could try and use JavaScript to append each option, adding the spaces that you need, but multiple spaces etc. etc. etc.

Are you trying to group the cars by country in your drop down list?

If so, are the country values required to be selected?

If they are not to be selected, then look at creating your own drop down content using <optgroup>? I do this on occasion and use JavaScript to retrieve and insert as the select control innerHTML.

SET HOLDLIST = PRINTONLY
SET ASNAMES  = ON
SET NODATA   = ''
TABLE FILE CAR
  SUM COMPUTE CTRY_GRP/A50 MISSING ON = IF COUNTRY NE LAST COUNTRY THEN '<optgroup label="'||COUNTRY||'">' ELSE MISSING; AS ''
      COMPUTE CAR_OPT/A60             = '<option value="'||CAR||'">'||CAR||'</option>'; AS ''
   BY COUNTRY NOPRINT
   BY CAR NOPRINT
ON TABLE PCHOLD FORMAT ALPHA
END

gives you -
<optgroup label="ENGLAND">                        <option value="JAGUAR">JAGUAR</option>                      
                                                  <option value="JENSEN">JENSEN</option>                      
                                                  <option value="TRIUMPH">TRIUMPH</option>                    
<optgroup label="FRANCE">                         <option value="PEUGEOT">PEUGEOT</option>                    
<optgroup label="ITALY">                          <option value="ALFA ROMEO">ALFA ROMEO</option>              
                                                  <option value="MASERATI">MASERATI</option>                  
<optgroup label="JAPAN">                          <option value="DATSUN">DATSUN</option>                      
                                                  <option value="TOYOTA">TOYOTA</option>                      
<optgroup label="W GERMANY">                      <option value="AUDI">AUDI</option>                          
                                                  <option value="BMW">BMW</option> 



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
Expert
posted Hide Post
thanks T, but that's not xml... I know I can do it in html with grouplabels and other ways (like just using a !IBI.FIL) but I gotta do it in xml.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Emily McAllister>
posted
Hi Susannah,

Do you mind explaining why you need the leading blanks, and why it needs to be in XML? Knowing exactly what this is for might help in coming up with workarounds.

Thanks,
Emily McAllister
Focal Point Moderator
 
Report This Post
Expert
posted Hide Post
WebFOCUS HTML Composer uses XML as format when retrieving data to populate all controls.


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
Master
posted Hide Post
I'm kind of with Emily on this... Why does it need to be XML? If its a thing of needing to populate the drop downs through native HTML Composer, you can use an ajax call to populate it. The option is available in App Studio. Although my attempts at using it have been more frustrating than anything else, Susannah's needs might be more basic and something App Studio can handle. If its going to require Pre/Post processing though.... Good luck. The actual call seems to be hidden in a comment block (The xml island minimized and shoved into a comment.... smh).


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
As Francis said, xml chains.
the xml requirement is a given.
the leading blanks are a customer requirement.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
In that case, wouldn't it help to use an "external procedure" to populate the controls so that you have control over what gets generated?

That is more difficult to use in chaining, but possible.


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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
S,

Try this. I don't have 7706 available but it should be ok.

T

SET HOLDLIST  = PRINTONLY
SET ASNAMES   = ON

FILEDEF TEMPHLD2 DISK TEMPHLD2.FTM (APPEND
-RUN

DEFINE FILE CAR
  SHFT_BLNK/A1   = HEXBYT(160,'A1');
  CAR_INDENT/A60 = SHFT_BLNK|SHFT_BLNK|SHFT_BLNK|SHFT_BLNK|SHFT_BLNK|CAR;
END
TABLE FILE CAR
  SUM CAR_INDENT
      COMPUTE CTRY/I3 = IF COUNTRY EQ LAST COUNTRY THEN LAST CTRY ELSE LAST CTRY + 1;
   BY COUNTRY/A20
   BY CAR/A20
ON TABLE HOLD AS TEMPHLD1
END
-RUN

TABLE FILE TEMPHLD1
  SUM COUNTRY/A60 AS OPTION_DISP
      COMPUTE SORT/I2 = 1;
   BY CTRY
   BY COUNTRY     AS OPTION_VALU
ON TABLE HOLD AS TEMPHLD2
END
-RUN

TABLE FILE TEMPHLD1
  SUM CAR_INDENT AS OPTION_DISP
      COMPUTE SORT/I2 = 2;
   BY CTRY
   BY CAR        AS OPTION_VALU
ON TABLE HOLD AS TEMPHLD2
END
-RUN

TABLE FILE TEMPHLD2
  SUM OPTION_DISP
   BY CTRY NOPRINT
   BY SORT NOPRINT
   BY OPTION_VALU
ON TABLE PCHOLD FORMAT XML
END
-RUN


Results in this -



Edited to add image

This message has been edited. Last edited by: Tony A,



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
Expert
posted Hide Post
you rock large time, T!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
T, I get this
áááá2016 March
the hexbyt xlates to those funky a letters w/ accents




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
omg it works like a charm with HEXBYT(255

YAAAAYYYYYY

here's a site of interest
http://www.asciitable.com/

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
quote:
works like a charm with HEXBYT(255

Really pleased that it worked for you!

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
  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] leading blanks in XML dropdown

Copyright © 1996-2020 Information Builders