5 Replies Latest reply on Nov 20, 2016 2:22 PM by AlasdairRobertson

    Using file import to populate validation lists

    wynnb Apprentice

      Is it possible to add items to a validation list via a file import integration?

       

      I'm adding some new Services, and need to map them to Categories and Subcategories for Incident classification. I've tried importing data to the Subcategory object (Service, Category, Subcategory), but it failed with the error that the Category is "not in the validation list of validated field SubCategory.Category."

       

      There must be a way to populate these besides manual entry; seems like I'm missing something simple.

       

      Bryan

        • 1. Re: Using file import to populate validation lists
          AlasdairRobertson ITSMMVPGroup

          There is a way to import them, Services are simple, you can just import in to the CI.Service object, check the required fields on the object and ensure in your CSV file.

           

          Example csv:

          ServiceName,DHOP,Status,TypeofService

          Application Service,Weekly HOP,Production,Technical

           

          Categories are linked to service so you add a service field to the Category object (e.g. servicelink Text(100)) add a search and link trigger to the CI.Service object (use the ServiceAssociatedCategory relationship) which will lookup the related service (based upon your servicelink field) and connect the category to the service.  Import in to the category object with both the category and service field (to ServiceLink).

           

          Example csv:

          ServiceName,Category,IsAvailableForProblemModule (optional)

          Application Service,Application Security,1

           

          Sub Category again a simple one, just have service,category and sub category in a csv and import to subcategory object,   as long as the service and category exist it will import, set the lookup key to be a combination of all three fields Service, Category, SubCategory.

           

          Example csv:

          ServiceName.Category.Sub Category

          Application Service,Application Security,Error

          Application Service,Application Security,Passowrd Reset

           

          I hope this helps.

           

          PS: if you are using sub category ensure that the subcategory field is made visible on the incident form.

           

          Edited for minor corrections

          1 of 1 people found this helpful
          • 2. Re: Using file import to populate validation lists
            wynnb Apprentice

            Thanks Alasdair,

             

            I've done the first step (import services), but was trying to jump directly to the third.  Sounds like the trick is to do it in three steps: import Services, import svc-category links, import svc-cat-subcat.

             

            Since the Category object already has relationships to CI.Service - is it necessary to create a new field, or can I point it to a relationship?

            • 3. Re: Using file import to populate validation lists
              AlasdairRobertson ITSMMVPGroup

              Ah no, you need a field to hold the service that that Category will link to the logic is that the category gets updated from the csv field, it imports a service to link to, the search and link then runs for that record and if the service exists the link is made.  If the same category is imported repeatedly against multiple services that is fine the primary key for this object is the Category name therefore the category overwrites and the service field overwrites the old service, the search and link fires and the category is now linked to another service.

               

              The relationship to CI.Service already exists but you cannot use any fields form CI.Service or it will not work.  This is a common process that is used in project implementations.

              1 of 1 people found this helpful
              • 4. Re: Using file import to populate validation lists
                wynnb Apprentice

                OK, I'm getting closer Alasdair, but not having luck with "add a search and link trigger to the CI.Service object". I added a triggered action rule (is that what you meant?), but it doesn't seem to be working. My rule runs on insert or update, with a condition of $([Category#.]ServiceLink != null), and runs a Search and Link action where Category>ServiceLink>Equal to>$(Name).

                 

                If it were working, I would expect to see things listed in the Service Desk Category tab when I look at CI Service, but there's nothing there. I ran a test import of subcategories, but am still getting the validation errors.

                 

                I really appreciate your help!

                Bryan

                • 5. Re: Using file import to populate validation lists
                  AlasdairRobertson ITSMMVPGroup

                  Hi Bryan

                   

                  Yes a Triggered Action on insert/update.  I usually don't bother with a filter as you are running this for the first time (but probably a good idea if this is to be used again in the future).

                   

                  The Search and link is configured as follows:

                   

                   

                  Remember to disable the rule after you have imported your category list.  You only want this running for Category csv imports.