I have a unique situation I would like to hear ideas on.
I am looking to create a text box a user can type an item number into, click an ADD button which will add that input into a list box, then click a submit button to run a report with all the values entered into a WHERE clause of a fex.
I'm curious to see if i'm alone on this because this is fundamental for us since our users know item numbers more than item descriptions.
The above needs to include a clear all and/or a clear single entry button. And for the cake topping, possibly validate against the item file to see if the value entered is accurate.
I got some help at the user conference but i haven't been able to excecute. As a warning, I am Java Script deficient.This message has been edited. Last edited by: Kerry,
version 8202M Reporting Server on Windows Server using DB2 Connect to access data from iseries.
September 01, 2010, 11:32 PM
Waz
I would suggest to have your text box and the selection list, and enter your values in the text box separated by commas or pipes, etc.
This way you can check the & variable from the text box and decide whether to use those values or the ones from the selection list, or both.
Splitting up a variable into multiple variables has been asked many times.
This way you don't need to know js, just FOCUS and DM code
You can go the rest of the way and have an ADd button, but this is time consuming, and perhaps just entering them, and hitting submit would be easiest.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 02, 2010, 03:03 AM
Dave
edit1 = your inputbox listbox1 = your listbox button1 = your "add" button.
Select the button Add an "onclick" event. And add this code:
-* File test_car.fex
-SET &ECHO ='ALL';
-DEFAULT &COUNTRY_NAME='ENGLAND';
-TYPE &COUNTRY_NAME
TABLE FILE CAR
PRINT
SEATS
DEALER_COST
RETAIL_COST
HEIGHT
COUNTRY
WHERE COUNTRY EQ '&COUNTRY_NAME'
END
please let us know.... if this helps out in any way.....
WebFocus7.6.2, WebFocus 7.1.1,Windows HTML, PDF and Excel
September 10, 2010, 02:46 PM
Joe Beydoun
Thanks everyone for your responses. I did a delimiter fix for the time being and still playing with Java Script to see other options.
I used a '+' for a delimiter and made the text area small enough to where that takes it to a different line. The only disadvantages are that i can't limit the number of characters in a text area only a text box, and what would be great is if gettok recognizes a carriage return as a delimiter.
version 8202M Reporting Server on Windows Server using DB2 Connect to access data from iseries.
September 10, 2010, 03:16 PM
Tony A
quote:
what would be great is if gettok recognizes a carriage return as a delimiter
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
September 10, 2010, 06:06 PM
Joe Beydoun
Tony, this functionality would be heavenly for me, but it didn't work, what am i doing wrong? I have the launch page setup with a text area, I typed a bunch of numbers separated by a carriage return but the GetTOK command did not recognize it. Here is my code:
version 8202M Reporting Server on Windows Server using DB2 Connect to access data from iseries.
September 10, 2010, 06:19 PM
Tony A
Trap the URL and post that. It might show both the carriage return andline feed chars seperating the entries.
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
September 13, 2010, 12:34 PM
Joe Beydoun
Sorry for the rookie status, but how do i trap a URL?
version 8202M Reporting Server on Windows Server using DB2 Connect to access data from iseries.
September 13, 2010, 01:10 PM
WFLurker
I want to add upon Joe idea of text box then ADD button to input into List Box.
I'm looking at a text box similar to how you use Google Search where you type something and a drop down appear with a list of search ideas.
Can this be possible with Javascript in a textbox scenario.
Where you type something in the textbox and it hit against the table/db with say WHERE CONTAINS '%XXXX%' which gives you all the possibile items and then you highlight the item you want then ADD to the listbox?
WF 8105M - Portal, Dashboard - Rcaster, Data Migrator - Windows 2012 Client Server - Dev/App Studio 8105 - Data: SQL, Oracle, Neteeza,MVS
September 13, 2010, 06:01 PM
Waz
quote:
text box similar to how you use Google Search
There are many examples available, I think all are javascript based, try using that google search.This message has been edited. Last edited by: Waz,
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 14, 2010, 03:27 PM
WFLurker
Only found one example on Focal Point on this issue: