Erin Trotter Posted October 24 Share Posted October 24 (edited) I create a car file similar to what I'm trying to do. So the file has many columns... a few columns spread throughout the data need to be updated. The data that needs to be updated is numeric. Here's an example: CARTEST.fex ENGINE INT CACHE SET ON -SET &ECHO='ALL'; SET BYDISPLAY = ON SET CENT-ZERO = ON SET PAGE-NUM = OFF SET HOLDMISS = ON SET HOLDLIST = PRINTONLY SET NODATA = '' SET TITLES = OFF SET ASNAMES = MIXED SET HTMLCSS = ON DEFINE FILE ibisamp/car UPDATELINK/A10V = 'Update'; CARLENGTH/A100V = '<input name="CAR_LENGTH" value="'|TRIM('L', EDIT(CAR.SPECS.LENGTH), 100, '0', 1, 'A100')|'">'; CARWEIGHT/A100V = '<input name="CAR_WEIGHT" value="'|TRIM('L', EDIT(CAR.SPECS.WEIGHT), 100, '0', 1, 'A100')|'">'; END -* SET PAGE-NUM=NOLEAD -* SET SQUEEZE=ON -* -DEFAULTH &WF_HTMLENCODE=ON; -* SET HTMLENCODE=&WF_HTMLENCODE -* SET HTMLCSS=ON -* -DEFAULTH &WF_EMPTYREPORT=ON; -* SET EMPTYREPORT=&WF_EMPTYREPORT -* -DEFAULTH &WF_ARVERSION=1; -* SET ARVERSION=&WF_ARVERSION -DEFAULTH &WF_SUMMARY='Summary'; -DEFAULTH &WF_TITLE='WebFOCUS Report'; TABLE FILE ibisamp/car SUM CAR.BODY.SEATS CAR.BODY.DEALER_COST CAR.BODY.RETAIL_COST CAR.BODY.SALES CAR.SPECS.LENGTH CARLENGTH CAR.SPECS.WIDTH CAR.SPECS.HEIGHT CAR.SPECS.WEIGHT CARWEIGHT CAR.SPECS.WHEELBASE CAR.SPECS.FUEL_CAP CAR.SPECS.BHP CAR.SPECS.RPM CAR.SPECS.MPG UPDATELINK BY CAR.ORIGIN.COUNTRY BY CAR.COMP.CAR BY CAR.CARREC.MODEL WHERE CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN IBISAMP/CAR |FORMAT=A10,SORT=ASCENDING)).COUNTRY:.; WHERE CAR.COMP.CAR EQ &CAR.(OR(FIND CAR.COMP.CAR IN IBISAMP/CAR |FORMAT=A16,SORT=ASCENDING)).CAR:.; WHERE CAR.CARREC.MODEL EQ &MODEL.(OR(FIND CAR.CARREC.MODEL IN IBISAMP/CAR |FORMAT=A24,SORT=ASCENDING)).MODEL:.; ON TABLE PCHOLD FORMAT HTML ON TABLE SET STYLE * TYPE=TITLE, CLASS='tblHead',$ TYPE=DATA, CLASS='tblData',$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, $ TYPE=DATA, COLUMN=N19, ALT='Update', TARGET='_blank', HYPERLINK-COLOR=BLUE, FOCEXEC=IBFS:/WFC/Repository/update_example/carupdate.fex(COUNTRY=CAR.ORIGIN.COUNTRY CAR=CAR.COMP.CAR MODEL=CAR.CARREC.MODEL LENGTH=CARLENGTH WEIGHT=CARWEIGHT),$ ENDSTYLE END -RUN CARUPDATE.fex (doesn't necessarily work, but just have it so I can compare the URL that is sent to webfocus and the parameters that are passed in it) MODIFY FILE ibisamp/car MATCH CAR.ORIGIN.COUNTRY CAR.COMP.CAR CAR.CARREC.MODEL ON MATCH UPDATE CAR.SPECS.LENGTH CAR.SPECS.WEIGHT ON NOMATCH REJECT END -RUN -SET &RESULT = IF &CHNGD EQ 1 THEN 'Updated' ELSE 'Rejected'; -HTMLFORM BEGIN <span style="position:absolute;top:0;left:4;">!IBI.AMP.RESULT;</div> -HTMLFORM END The URL that I get when I submit the drilldown is the entire control and the value that the control was when the page first loaded... it does NOT pass the updated value at all even within the entire control code Ex: IBIF_ex=IBFS:/WFC/Repository/update_example/carupdate.fex&CLICKED_ON=&COUNTRY=ENGLAND&CAR=JAGUAR&MODEL=V12XKE%20AUTO&LENGTH=<input%20name="CAR_LENGTH"%20value="189%20%20">&WEIGHT=<input%20name="CAR_WEIGHT"%20value="3435%20%20"> Edited October 24 by Erin Trotter Link to comment Share on other sites More sharing options...
Clayton Peacock Posted October 25 Share Posted October 25 Hi Erin, You will not get the updated input value being passed from the main report to the MODIFY, as you are saying that it should pass the DEFINEed field which comes from the table. WebFOCUS does not know what you are typing on the HTML inputs. You will need to use HTML to submit the values to WebFOCUS. Define: CARWEIGHT/A100V = '<input name="CAR_WEIGHT" value="'|TRIM('L', EDIT(CAR.SPECS.WEIGHT), 100, '0', 1, 'A100')|'">'; HTML: FOCEXEC=IBFS:/WFC/Repository/update_example/carupdate.fex(LENGTH=CARLENGTH WEIGHT=CARWEIGHT),$ Passed parameter: &WEIGHT = <input name="CAR_WEIGHT" value="3435 "> What you need to do is look at the way the form is being created as a field in the below example, this will then submit the value that you input on the HTML input text. https://community.ibi.com/forums/topic/16240-update-sql-table Tweak this: COMPUTE AUDITOR_COMMENTS1/A1000V = '<form name=uomform2 action="/ibi_apps/run.bip" method="get" target="frame'| F |'" style="height:10px;top:0px;">' | '<input type="hidden" name="BIP_REQUEST_TYPE" value="BIP_RUN">' | '<input type="hidden" name="BIP_folder" value="IBFS:/WFC/Repository/update_example">' | '<input type="hidden" name="BIP_item" value="/update_test.fex">' | '<input type="hidden" name="ID" value="' | ID || '">' | '<div style="display:flex;flex-wrap:wrap;top:0px;">' | '<input name="AUDITOR_COMMENTS1" value="'| '' | '" size=15 maxlength=20 style="font-size:14px;height:11px;">' | '<iframe name=frame'| F |' frameborder=0 height=18 width=20 scrolling="no"></iframe>' | '</div>' |'</form>'; AS 'Auditor Comments' -* To help debug in the MODIFY report -SET &ECHO=ALL: -? &WEIGHT Good luck, Clayton Link to comment Share on other sites More sharing options...
Solution David Beagan Posted October 25 Solution Share Posted October 25 Erin, that is an interesting try, but WebFOCUS drilldown doesn't see the HTML input's values that are typed in. I posted another example on your original post that might be more like what you are looking for. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now