Forums
FOCUS/WebFOCUS
DevStudio multiselect combobox to select column from a table|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Platinum Member |
How can I select colums from a table so that those are the mutiselect items in a combobox?
Example: I am trying to PRINT columns COUNTRY, CAR, D_COST and MODEL from CAR table. I want the combobox to be filled with all the column name from CAR table i.e. COUNTRY, CAR, D_COST, R_COST, MODEL, etc... The user should be able to select 1 or more colums from the combobox and depending on the selection, x amount of colums should appear on the report. WF 7.6.x and 7.1.x Win/Solaris/AIX, MRE/Dashboard/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, JD Edwards |
||
|
|
Master |
If you are using HTML painter, create a focexec:
CHECK FILE filename HOLD TABLE FILE HOLD BY FIELDNAME ON TABLE PCHOLD FORMAT XML END and attach that to a multi-select. Then create a report using the parameters (field names) passed from the multi-select. The same type of request can be run for self service also, but using the methods often quoted in FP for creating your list box. Alan. WF 7.6.5, PMF 5.1, MRE,RA,RG, etc... Win2003(8xQuad)/IIS/Tomcat with SSL and AD security. |
|||
|
|
Virtuoso |
Simple but smart solution Alan....
I will keep this in mind.
|
|||||||
|
|
Platinum Member |
Thank you Alan. That did allow me to populate my list box with field names. Now how do I multi select those field names and generate colums on my report based on my selection?
This is the approach I am taking: 1) form- create html file that points to fex1 to dynamically populate the column title. then have a submit button that will submit the values to fex2. 2) fex1- is where hold the fieldname as you suggested 3) fex2- is where I am planning to display fields according to my selection from my form. I am failing to see how I would create fex2 so that the values from the form can be submitted and appropriate columns show up on the report. WF 7.6.x and 7.1.x Win/Solaris/AIX, MRE/Dashboard/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, JD Edwards |
|||
|
|
Platinum Member |
Okey, this seems to work unless you only select 1 value or ALL option. Code needs to be changed for those.
-TYPE &FIELDS -* Remove OR from the &FIELDS -SET &FIELDS_LENGTH = &FIELDS.LENGTH; -SET &FIELDS1 = STRREP (&FIELDS_LENGTH, &FIELDS, 6, ''' OR ''', 2, ' @', &FIELDS_LENGTH, 'A&FIELDS_LENGTH.EVAL'); -SET &FIELDS2 = STRIP(&FIELDS_LENGTH, &FIELDS1, '@', 'A&FIELDS_LENGTH.EVAL'); -SET &FIELDS3 = STRIP(&FIELDS_LENGTH, &FIELDS2, '''', 'A&FIELDS_LENGTH.EVAL'); -TYPE &FIELDS1 -TYPE &FIELDS2 -TYPE &FIELDS3 TABLE FILE CAR PRINT &FIELDS3.EVAL END WF 7.6.x and 7.1.x Win/Solaris/AIX, MRE/Dashboard/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, JD Edwards |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|
Forums
FOCUS/WebFOCUS
DevStudio multiselect combobox to select column from a table
