Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Changing an OR separated value
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Changing an OR separated value
 Login/Join
 
Gold member
posted
Hi all,
I've been working on an HTML page that uses checkboxes. The way the checkbox string is produced, it is equal to something like
'X' OR 'Y' OR 'Z'
But the quotes around each individual value are creating a bit of a problem. I have found that if I manually enter it, it will work if the outputted string is formatted in one of two ways.
'X OR Y OR Z', or
X,Y,Z
How would I change the way the string is formatted to be either of those?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.2.01M on Windows 7
 
Posts: 48 | Registered: July 30, 2018Reply With QuoteReport This Post
Platinum Member
posted Hide Post
One way ...

-*
-SET &IND_SECT  = '''X'' OR ''Y'' OR ''Z''';
-SET &IND_SECT1 = TRUNCATE(STRREP(&IND_SECT.LENGTH,&IND_SECT,6,''' OR ''',4,' OR ',&IND_SECT.LENGTH,A&IND_SECT.LENGTH));
-*
-TYPE IND_SECT -------------- &IND_SECT
-TYPE IND_SECT(LENGTH) ------ &IND_SECT.LENGTH
-TYPE -----------------------
-TYPE IND_SECT1 ------------- &IND_SECT1
-TYPE IND_SECT1(LENGTH) ----- &IND_SECT1.LENGTH


WebFocus 8.201M, Windows, App Studio
 
Posts: 221 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Or this gives you both ...

-*
-SET &IND_SECT  = '''X'' OR ''Y'' OR ''Z''';
-SET &IND_SECT1 = TRUNCATE(STRREP(&IND_SECT.LENGTH,&IND_SECT,4,' OR ',1,',',&IND_SECT.LENGTH,A&IND_SECT.LENGTH));
-SET &IND_SECT2 = TRUNCATE(STRREP(&IND_SECT1.LENGTH,&IND_SECT1,1,'''',0,'',&IND_SECT1.LENGTH,A&IND_SECT1.LENGTH));
-*
-TYPE IND_SECT -------------- &IND_SECT
-TYPE IND_SECT(LENGTH) ------ &IND_SECT.LENGTH
-TYPE -----------------------
-TYPE IND_SECT1 ------------- &IND_SECT1
-TYPE IND_SECT1(LENGTH) ----- &IND_SECT1.LENGTH
-TYPE -----------------------
-TYPE IND_SECT2 ------------- &IND_SECT2
-TYPE IND_SECT2(LENGTH) ----- &IND_SECT2.LENGTH


WebFocus 8.201M, Windows, App Studio
 
Posts: 221 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
Platinum Member
posted Hide Post
This gives you both using the REPLACE function ...

-SET &IND_SECT = '''X'' OR ''Y'' OR ''Z''';
-SET &IND_SECT1 = REPLACE(&IND_SECT, ''' OR ''', ' OR ');
-SET &IND_SECT2 = REPLACE(REPLACE(&IND_SECT, ' OR ', ',') ,'''', '');
-*
-TYPE IND_SECT -------------- &IND_SECT
-TYPE IND_SECT(LENGTH) ------ &IND_SECT.LENGTH
-TYPE -----------------------
-TYPE IND_SECT1 ------------- &IND_SECT1
-TYPE IND_SECT1(LENGTH) ----- &IND_SECT1.LENGTH
-TYPE -----------------------
-TYPE IND_SECT2 ------------- &IND_SECT2
-TYPE IND_SECT2(LENGTH) ----- &IND_SECT2.LENGTH


WebFocus 8.201M, Windows, App Studio
 
Posts: 221 | Location: Lincoln Nebraska | Registered: August 12, 2008Reply With QuoteReport This Post
Member
posted Hide Post
I believe you just need to go to the checkbox properties and set the "Multiple: Add quotes" setting to "No".


WebFOCUS 8.0.09
Windows 7
 
Posts: 3 | Location: San Antonio, TX | Registered: December 17, 2014Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Changing an OR separated value

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.