Skip to Content

Rename multiple WebI Documents

Hi,

How I can rename multiple WebI Documents at once? I need to replace some symbols for

hundreds of WebI documents in the BI platform.

If you know a secure way how to do it it would be great if you could share with the solution.

Currently thinking about scanning the CMS DB and looking for the tables that are storing the WebI Document names. Is there anything else that needs to be changed in order to not corrupt the WebI report, its schedules, etc.

Thank you in advance,

Vytautas Thienel

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 28, 2017 at 02:10 PM
    void modifyInfoObject(IEnterpriseSession enterpriseSession, String oldName, String newName) throws SDKException
    {
    	IInfoStore infostore = (IInfoStore) enterpriseSession.getService("InfoStore");
    	String query = "SELECT SI_ID FROM CI_INFOOBJECTS " 
    		+ "WHERE SI_KIND='" + IFolder.FOLDER_KIND + "' "
    		+ "And SI_NAME='" + oldName + "' And SI_INSTANCE=0";
    	IInfoObjects objs = infostore.query(query);
        	
    	IInfoObject obj = (IInfoObject) objs.get(0);
    	obj.setTitle(newName);
    
    	infostore.commit(objs);
    }
    Add comment
    10|10000 characters needed characters exceeded

  • Nov 28, 2017 at 12:11 PM

    Using JAVA SDK you can achieve this.

    -

    Bharath

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 06, 2017 at 03:15 PM

    You cannot do this directly in the database. The relevent information is in a proprietary format in a blob field. So, you will have to use the SDK. The code in the original answer to this shows how to do it for a single report. I might do something like this instead:

    void changeRptNames(IEnterpriseSession eSession, string oldSymbol, string newSymbol){
    IInfoStore infostore = (IInfoStore) enterpriseSession.getService("InfoStore"); String query = String.format("Select SI_ID, SI_NAME from CI_INFOOBJECTS where SI_INSTANCE = 0 and SI_NAME like '%s'", oldSymbol); IInfoObjects objs = infostore.query(query); for (Object obj : objs){ IInfoObject iobj = (IInfoObject) obj; iobj.setTitle(iobj.getTitle().replace(oldSymbol, newSymbol); } objs.commit(); }

    Note: by default an infostore query will only return up to 1,000 records. If you have more reports than that, you'll need to either use a paged query or (easier) change the query to Select Top n SI_ID, SI_NAME... where "n" is a number that is equal or greater than the number of reports that you expect to find.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded