Captain
Captain
394 views

Can Appscript or Modscript read in External Files and attach them to items?

Hello,

We are migrating attachments from another tool into SBM.

The SBM records should have the filenames within them. So, I would like to create an Appscript or Modscript to read the items filename and then go out to a directory and upload the file as an attachment. 

Is this possible and does anyone have a code sample? 

Regards,

Will

 

0 Likes
3 Replies

Yes, It can be achieved by SBM Appscript / Orchestrations. Below are my questions,

May I know your file locations? Is it inside application server or outside?

Is your attachments are stored in file system or database? If it is stored on database, you can't achieve by app script.

 

0 Likes
Captain
Captain

I am storing my attachments within the SBM database.

If it can't be done with appscript how about Mod script?

Maybe I need to go to plan B and put the attachments into Dimensions and somehow provide a link to the files within Dimensions.

 

Thanks for responding.

 

 

0 Likes
Fleet Admiral
Fleet Admiral

@redbug2 Is this a one-time-only import?  If so, it might be easier to create the attachment and attachment sequence records in SQL.

Even though you've configured attachments to go into the database, I'm betting that you can put the file into the file system, create records in TS_ATTACHMENTS and TS_ATTACHMENTSEQUENCES and the file will be magically imported into the database (the TS_BLOBS table) after you restart SBM.

The trick is that you need to be comfortable doing things with the SBM database and definitely need to know the table schema.

 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.