Absent Member.. Matt Brier Absent Member..
Absent Member..
842 views

Importing multiple quantity via Connect-It

I'm racking my brains on this one and I want to know if it is even possible.  I have a tab-delimitted spreadsheet of assets that I need to import into AssetCenter and assign to a specific user.  That part was easy.  The problem is each line has a column that lists a quantity and I need to be able to import/create that number of assets.  Purely for example I'll have a line that says User: John Smith, Asset: Dell Desktop, Qty: 3.  I need to be able to create three Dell Desktop assets during the import.

 

Is that even possible?

 

Using Connect-It 3.6 and AssetCenter 4.4.2 with a MSSQL backend.

0 Likes
5 Replies
KrishnaKYadav Absent Member.
Absent Member.

Re: Importing multiple quantity via Connect-It

Hi,

 

In assetmanager if you want to create two same type of assets, they should have different assettag detail. You can't have two assets with same assettag in Assetcenter.

 

Cheers,

Krishna

0 Likes
Acclaimed Contributor.. Mark Cullen_1 Acclaimed Contributor..
Acclaimed Contributor..

Re: Importing multiple quantity via Connect-It

I don't know if it is possible but look into the guides for "collections".  I have not used this in awhile so i am sorry i can't be of more help but the collections functionality maybe able to create the individual assets via quantity field.  your root mapping table should be amEmplDept since your user can have multiple assets.

0 Likes
Absent Member.. MTWalsh Absent Member..
Absent Member..

Re: Importing multiple quantity via Connect-It

It can be done.  Create a table called amImportLine (or whatever makes sense to you).  Make a link to amPortfolio (or computer, or asset...whichever makes the most sense).  Make it so that 1 import line record is associated with multiple portfolio items (normal link from amImportLine).  Map in to the import line table from your spreadsheet.  Here you could do a couple of things.  If you made a link to amPortfolio from amImportLine, you can create a collection mapping and write the collection entries from the root mapping box using PifSetStringVal().  For example, PifSetStringVal("amImportLine.Portfolio(1).AssetTag", strAssetTag).  Or you could simply make your amImportLine table mimic the format of the tab delimited text file and include the asset count column, and then process each ImportLine with a workflow.  Doing it that way, you don't need the link to the amPortfolio table in amImportLine.  You can simply process each line of the amImportLine table with a workflow (either periodic or insert triggered...i like periodic better). 

Highlighted
Absent Member.. Yousef Bayari Absent Member..
Absent Member..

Re: Importing multiple quantity via Connect-It

Hello Matt,

First of all , as Krishna mentioned , you should be sure you have a default value script in AM for the unique fields (amAsset.AssetTag, amPortfolio.Code ), I understood your file doesn't have a unique field for the new assets.

Then, the question is; are you going to load this time for once or it will be on regular basis ?

If it is one time load then the simplest way is to write a script to generate a file that repeats each line * quantity you have in the file and then use connect it to load the generated file.

If this file to be loaded regularly then you can follow what MTWalsh proposed, but I believe it will be simpler to have a script to generate a file with repeated lines and then loading the new file, you still can use connectit to call the script first and then loading the new generated file.

Regards,

Yousef

Absent Member.. Matt Brier Absent Member..
Absent Member..

Re: Importing multiple quantity via Connect-It

MTWalsh - That's a similar solution to what we're doing with our automated invoicing.  The problem is time.  I had a whole project around importing seperate files and processing them through the normal PO channels that worked fine, but due to lack of communication from all parties the idea has been scrapped and I've been tasked with coming up with a quick replacement.  Having said that, you're idea has sparked an idea in my head to use the existing table we use to import invoicing lines since it is essentially the same data/field structure and created a couple of workflows that would process this data into the asset table.

 

However I'm going to try and run with Yousef's idea first.  Even though this would be an ongoing project, if I can get a script written to duplicate the lines and then import via Connect-It, I think it would be easier overall.

 

Also we already have a script in place to create a unique AssetTag so that won't be an issue.

0 Likes
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.