Knowledge Partner
Knowledge Partner
946 views

CIT Read file help

Jump to solution

Hi Guys

 

Just wondering if anyone can assist me, I am still getting to deal with the more advanced stuff in Connect-IT

 

Basically i want to use Email fetching connector to get 2 fields "Subject and body"

 

I have a CSV File with 2 columns "Email & Id"

 

Now what I want the connetor to do is, when an email comes in it must take the email address from the mail and then check the csv file for the email address, if found it must take the Id of that record and input it in the mapping file as variable that is to be sent to destination

 

i am new to using the pifquery etc, so any help would be appreciated

0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.. Flavio Bianchi Trusted Contributor..
Trusted Contributor..

Re: CIT Read file help

Jump to solution

Ok,

I think that best choice is to use Maptables and not a simple csv file.

 

Open your scenario and then choose "Scenario" menu and then "Maptables...".

 

Look at one of OOB maptables for syntax, for example:

cit install dir\config\shared\mpt\cpuspeed.mpt

 

for example:

{ MapTable ChassisTypes
  Desktop | Desktop computers
  Low Profile Desktop | Desktop computers
  Pizza Box | Desktop computers
  Mini Tower | Desktop computers
  Tower | Desktop computers
  Portable | Laptop
  Laptop | Laptop
  Notebook | Laptop
  Hand Held | Handheld
}

 And then use PifIsInMap and PifMapValue (look at documentation).

 

Is it acceptable?

View solution in original post

6 Replies
Outstanding Contributor.. Tommy Jensen Outstanding Contributor..
Outstanding Contributor..

Re: CIT Read file help

Jump to solution

It would be much easier to do this in Javascript inside Service Manager. Javascript has a readFile function to read the file and then it is very easy to parse it.

Knowledge Partner
Knowledge Partner

Re: CIT Read file help

Jump to solution

Hi Tommy

 

Yes indeed in SM it is much easier to build the logic fo rthis, however I am not using SM. its and email to HP SAW scenario, hence me trying to build the logic in CIT as I cannot do it in HP SAW

0 Likes
Trusted Contributor.. Flavio Bianchi Trusted Contributor..
Trusted Contributor..

Re: CIT Read file help

Jump to solution

Hi,

Your csv file is static or can change between CIT execution?

0 Likes
Knowledge Partner
Knowledge Partner

Re: CIT Read file help

Jump to solution

Hi

 

CSV File will be static, will change maybe once a month. but for now it will be static

0 Likes
Highlighted
Trusted Contributor.. Flavio Bianchi Trusted Contributor..
Trusted Contributor..

Re: CIT Read file help

Jump to solution

Ok,

I think that best choice is to use Maptables and not a simple csv file.

 

Open your scenario and then choose "Scenario" menu and then "Maptables...".

 

Look at one of OOB maptables for syntax, for example:

cit install dir\config\shared\mpt\cpuspeed.mpt

 

for example:

{ MapTable ChassisTypes
  Desktop | Desktop computers
  Low Profile Desktop | Desktop computers
  Pizza Box | Desktop computers
  Mini Tower | Desktop computers
  Tower | Desktop computers
  Portable | Laptop
  Laptop | Laptop
  Notebook | Laptop
  Hand Held | Handheld
}

 And then use PifIsInMap and PifMapValue (look at documentation).

 

Is it acceptable?

View solution in original post

Knowledge Partner
Knowledge Partner

Re: CIT Read file help

Jump to solution

Thank you!!!!

 

This will work for now, I got it working properly quite easily

I will however continue trying to get the proper way to do this, I am very close, just a bit of fine tuning needed

 

Have never worked with maptables before, I already have another solution that will benefit from using this

 

Thanks you Flavio

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.