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]Appending(not happening as expected) ID's and passing it to fex
Go
New
Search
Notify
Tools
Reply
  
[Solved]Appending(not happening as expected) ID's and passing it to fex
 Login/Join
 
Platinum Member
posted
Hi,

I am trying to store 3 values separated by OR as an ID column and a description field next to it.

For ex:
I have the data in the below format.
  
PID   PNAME
0010  Product1
0011  Product2
0015  Product3
0016  Product3
0018  Product3
0017  Product4


As you can see I have three IDs for Product3.

I have a fex i use to display the product filer values and i pass ID's as value and PNAME as display.
since i have 3 PIDs for Product3,it gets repeated 3 times.
But i want to display Product3 one time only and when i select Product3 ,i should pass PID as '0015' OR '0016' OR '0018'

I can create another define field to create a unique id,but i was trying to modify the product filer fex alone to pass all the three values together ,as that is an easy fix.
I have around 100 reports which uses this filter,i don't want to make change in all those unless it is necessary.

My attempt.
  
DEFINE FILE PRODUCTS
DEF_PID/A100V = IF PID EQ '0015' THEN '0015'||' OR '||'0016'||' OR '||'0018'
ELSE IF PID EQ '0016' THEN '0015'||' OR '||'0016'||' OR '||'0018'
ELSE IF PID EQ '0018' THEN '0015'||' OR '||'0016'||' OR '||'0018'
ELSE PID
END
TABLE FILE PRDOUCTS
SUM
PNAME
BY DEF_PID
END

This should work i think.
But when it does the append operation,
i get the below output.
 
DEF_PID                  PNAME

0010                 Product1
0011                 Product2
0015 OR0016 OR0018   Product3
0017                 product4
 

First Issue : Append is not happening properly.
Second Issue :When i pass the PID to another fex,i should have single quotes for the DEF_PID(i can do that using QUOTEDSTRING) but how can i do that for the appended DEF_PID.

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


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 198 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Expert
posted Hide Post
First Issue: Double Bars, '||', are STRONG concatenations. You want a WEAK Concatenation so use a Single Bar: '|'.

Second Issue: Try surrounding the concatenated string with three, or should that be four single quotes.
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Doug,

I was careless in using || string concatenation instead of |.
Was able to solve both issues.
Thanks


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 198 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Appending(not happening as expected) ID's and passing it to fex

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