Focal Point
[CLOSED] How to move fex from repository to app (by code)

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

June 15, 2018, 08:22 PM
Antonio Mendes
[CLOSED] How to move fex from repository to app (by code)
Hi All,

I need to get the code of one existing fex located at the repository.

My first option would be to move (or copy) that fex from repository to app folder at edaserver side (by code).

I tried the APP COPYFILE command but it did not work...
APP COPYFILE IBFS:/WFC/Repository/mydomain/my_origin.fex mysrvapp/my_dest.fex

I also tried to allocate the file (since this could solve my problem)
FILEDEF READFIX DISK IBFS:/WFC/Repository/mydomain/my_origin.fex

And also tried to use INCLUDE (within a fex running on server/app side)
-INCLUDE IBFS:/WFC/Repository/mydomain/my_origin.fex

Any of this seams to work...Any ideas?
Thanks in advance.
Antonio Mendes

This message has been edited. Last edited by: FP Mod Chuck,
June 16, 2018, 12:14 PM
FP Mod Chuck
Antonio

Welcome to Focal Point, it is a great forum for getting answers to your development questions.

In app studio it is a simple copy and paste of the report object from the repository folder to the app folder under the Data Servers. You will need to change any style sheet or drill down references accordingly after you copy it over.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
June 18, 2018, 05:43 AM
Antonio Mendes
Hi

I'm searching a way to copy from repository to app folder in server using code... in order to automate a process.

Thanks
António Mendes
June 18, 2018, 08:00 AM
MartinY
It's still not a possible option and I don't think that it will become one. At least not before few versions.

What's in the repository exist in a BLOP table where App exist as in a "regular" folder such as in Windows.
Your only option is the one posted by Chuck and it's a manual process.

By curiosity : why would you like to create an automated process ? You need to copy from one place to the other regularly ?
Maybe by understanding your need we may suggest an alternative


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
June 27, 2018, 12:23 AM
StuBouyer
The WebFOCUS RESTful calls used to allow you to do this

Something like this:

http://localhost:8080/ibi_apps/rs/ibfs/EDA/EDASERVE/ibisamp/carinst.fex?IBIRS_action=copy&IBIRS_destination=/WFC/Repository/public/test_carinst.fex&IBIRS_replace=true


will copy carinst.fex from the IBISAMP folder to Public folder in repository.

You could create a FEX to loop through the files in an app folder and create an IFRAME to call the RESTful API

DEFINE FILE RPTLIST
CNTR_A/A2L=EDIT(CNTR);
END
TABLE FILE RPTLIST
PRINT
	  CNTR_A NOPRINT
COMPUTE IFRAME/A1000V = '<IFRAME name=iframe' || CNTR_A | ' src="http://localhost/ibi_apps/rs/ibfs/EDA/EDASERVE/poc_assets/templates/' || FEXNAME || '?IBIRS_action=move&|IBIRS_destination=/WFC/Repository/Public/' || FEXNAME || '&|IBIRS_replace=true"></IFRAME>';
BY CNTR NOPRINT
ON TABLE SAVE AS RPTLIST FORMAT HTMTABLE
END
-RUN
-HTMLFORM BEGIN
<!DOCTYPE html>
<html><head>
</head>
<body>
!IBI.FIL.RPTLIST;
</body>
</html>
-HTMLFORM END  



WebFOCUS 8.2.03 (8.2.06 in testing)
July 09, 2018, 09:47 AM
krish
Create export package with the required fex file. You will able to get the fex in the file system on the export folder. finally you can copy the same to app directory.


7.1.1
Windows XP
HTML