Focal Point
Narrative Infomation - Fixed Fields to Web then back to Fixed Fields.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3171082371

June 23, 2006, 01:43 PM
David Briars
Narrative Infomation - Fixed Fields to Web then back to Fixed Fields.
Greetings,

I am storing narrative-type information in a FOCUS database, within fields like this:

  
  FIELDNAME=LINE1       ,ALIAS=LINE1       ,FORMAT=A250 ,$
  FIELDNAME=LINE2       ,ALIAS=LINE2       ,FORMAT=A250 ,$
  FIELDNAME=LINE3       ,ALIAS=LINE3       ,FORMAT=A250 ,$


I'd like my user to be able to view and then edit the information, and then I'll save it back to the database.

From my research, it looks like I'll want to use the TEXTAREA HTML control.

I've populated, and then used the contents to update my database, many different types of controls before, but never TEXTAREA.

Does anyone have any suggestions, comments, or code-outlines, of how I can pass narrative data, to/from my db via a web page?

Regards,
Dave




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
June 23, 2006, 03:26 PM
KevinG
David,

This sounds like a perfect case for a simple MAINTAIN application. You could easily create a MAINTAIN web app to populate an "editable" table for your users.


WF 7.6.10 / WIN-AIX
June 23, 2006, 03:48 PM
susannah
Kev, David can do it with MODIFY. He doesn't need MAINTAIN.
David, you'll probably want to pass the &var for the textarea (say its called &MYANSWER)
back to your fex, making sure you've restricted the textarea to 250 chars
<textarea rows="5" name="MYANSWER" cols="250"></textarea>

and then look at the result field;
you'll probably have cr/lf in the response field and you may want to strip them out before you process the data. there are several ways to do that...holler back when you get that far.
Now for updating your source db, you can use a MODIFY
to change the data value in the database from whatever it was before the user changed it, to whatever it is now.
You've used MODIFY before??? or is it just the TEXTAREA fielddtype you had not used before?
If you already have a MAINTAIN license, just ignore me and go listen to KevinG.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 23, 2006, 04:05 PM
David Briars
Hi Kevin and Susannah,

We don't have access to MAINTAIN in our environment.

I am ok with the MODIFY commands to update the database.

My questions more have to do with controlling the TEXTAREA HTML control, and responding to my data entry person's actions:
- How to limit the data entry person to 250 characters?...
- How to strip out cr/lf...

Thanks, for your responses!

-Dave
June 23, 2006, 04:35 PM
susannah
use the html example i gave you go limit the size cols="250"
then do a test, read that field in via some text fex and see what the data looks like; see what the cr/lf looks like...what kind of character do you see? at my site, it looks like a little box..and i have a way to handle it..but you might be able to CTRAN it out or STRIP it out, but we have to identify it first.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID