Focal Point
[SOLVED] UPDATE/MODIFY RECORDS IN WF TABLE

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

November 05, 2008, 02:58 PM
vkrugman
[SOLVED] UPDATE/MODIFY RECORDS IN WF TABLE
Please help me to create a procedure that will populate the data(or update the records in a table) using a value from another field in the same table. For example,
Here is the record I have. I need to update filed OMETHOD( currently null value) with 'CATS'(value that belongs to BSARK field).
The key fields are PERIOD INVOICENUM

MANDT PERIOD INVOICENUM OMETHOD BSARK
100 200811 1034597526 NULL CATS

thanks a lot

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


Valeriya

WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000
November 05, 2008, 03:45 PM
Danny-SRL
Lera,

I will assume that OMETHOD and BSARK have the same format.

There are 2 methods I can think of (probably more...).
Method 1:
SET HOLDLIST=PRINTONLY, ASNAMES=ON  
TABLE FILE filename
PRINT BSARK AS OMETHOD
BY PERIOD BY INVOICENUM
ON TABLE HOLD
END
MODIFY FILE filename
FIXFORM FROM HOLD
MATCH PERIOD INVOICENUM
ON MATCH UPDATE OMETHOD
ON NOMATCH REJECT
DATA ON HOLD
END


Method 2 - this works only with FOCUS files
MODIFY FILE filename
NEXT PERIOD INVOICENUM
ON NEXT COMPUTE OMETHOD=D.BSARK;
ON NEXT UPDATE OMETHOD
ON NONEXT GOTO EXIT
DATA
END  

Good luck.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

November 05, 2008, 03:53 PM
vkrugman
I'LL TRY THANK YOU


Valeriya

WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000
November 11, 2008, 04:52 PM
vkrugman
quote:
Originally posted by Danny-SRL:
Lera,

I will assume that OMETHOD and BSARK have the same format.

There are 2 methods I can think of (probably more...).
Method 1:
SET HOLDLIST=PRINTONLY, ASNAMES=ON  
TABLE FILE filename
PRINT BSARK AS OMETHOD
BY PERIOD BY INVOICENUM
ON TABLE HOLD
END
MODIFY FILE filename
FIXFORM FROM HOLD
MATCH PERIOD INVOICENUM
ON MATCH UPDATE OMETHOD
ON NOMATCH REJECT
DATA ON HOLD
END


Method 2 - this works only with FOCUS files
MODIFY FILE filename
NEXT PERIOD INVOICENUM
ON NEXT COMPUTE OMETHOD=D.BSARK;
ON NEXT UPDATE OMETHOD
ON NONEXT GOTO EXIT
DATA
END  

Good luck.



Valeriya

WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000
November 11, 2008, 04:53 PM
vkrugman
Thank you very much. It worked!


Valeriya

WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000