none
Power Query to fetch Data using API RRS feed

  • Question

  • Hi All,

    I am using below query to import data using API. I want to modify the below query , if this below function not found Web content link than it must ignore that link and download rest of the data.

    Can any body help me out how to modify the below function ?

    let GetResults=(URL) =>
    let
        Source = Json.Document(Web.Contents("https://XX-XX.XXXXXX.XXXXXXX.com/unknown/unknown/people/search/"& URL)),
        #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
        #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"profileID", "chargedCC", "managerProfileID", "managerFullName", "legalManagerFullName", "assistantProfileID", "assistantFullName", "companyName", "companyType", "jobArea", "jobFamily", "job", "firstName", "lastName", "localFirstName", "localLastName", "fullName", "localName", "company", "department", "telephone", "telephoneSource", "mobile", "mobileSource", "fax", "ecnExtension", "email", "emailSource", "displayName", "roomNumber", "jobTitle", "positionId", "costCentre", "XXXXXXXConnection", "employeeNumber", "payrollNumber", "status", "initials", "country", "street", "city", "postalCode", "countryCode", "buildingNumber", "operationalUnit", "organizationalUnitShortName", "organizationalUnitId", "employeeType", "isOpManager", "hrContact", "signType", "nickName", "funcidowner", "distinguishedName", "owner", "member", "mailNickname", "managedBy", "memberOf", "otherTelephone", "info", "assistantPhone", "ownerDisplayname", "objectClass", "objectCategory", "authOrig", "authOrigBL", "unixUid", "destinationIndicator", "srchMOD", "srchONLYMGR", "srchONLYEMP", "functionalUserIdList", "pdlDddlList", "emailHelp", "telephoneHelp", "mobileHelp", "faxHelp", "cityHelp", "zipHelp", "officeHelp", "countryHelp", "streetHelp", "contractEndDateHelp", "office", "resignDate", "manager", "modifyTimestamp", "funcIdOwner", "operationalManagerFullName", "operationalManager", "id"}, {"profileID", "chargedCC", "managerProfileID", "managerFullName", "legalManagerFullName", "assistantProfileID", "assistantFullName", "companyName", "companyType", "jobArea", "jobFamily", "job", "firstName", "lastName", "localFirstName", "localLastName", "fullName", "localName", "company", "department", "telephone", "telephoneSource", "mobile", "mobileSource", "fax", "ecnExtension", "email", "emailSource", "displayName", "roomNumber", "jobTitle", "positionId", "costCentre", "XXXXXXXConnection", "employeeNumber", "payrollNumber", "status", "initials", "country", "street", "city", "postalCode", "countryCode", "buildingNumber", "operationalUnit", "organizationalUnitShortName", "organizationalUnitId", "employeeType", "isOpManager", "hrContact", "signType", "nickName", "funcidowner.1", "distinguishedName", "owner", "member", "mailNickname", "managedBy", "memberOf", "otherTelephone", "info", "assistantPhone", "ownerDisplayname", "objectClass", "objectCategory", "authOrig", "authOrigBL", "unixUid", "destinationIndicator", "srchMOD", "srchONLYMGR", "srchONLYEMP", "functionalUserIdList", "pdlDddlList", "emailHelp", "telephoneHelp", "mobileHelp", "faxHelp", "cityHelp", "zipHelp", "officeHelp", "countryHelp", "streetHelp", "contractEndDateHelp", "office", "resignDate", "manager", "modifyTimestamp", "funcIdOwner", "operationalManagerFullName", "operationalManager", "id"})
    in
        #"Expanded Column1"
    
    in GetResults

    And This query 

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"SIGNUM", type text}}),
        #"Renamed Columns" = Table.RenameColumns(#"Changed Type",{{"SIGNUM", "URL"}}),
        #"Added Custom" = Table.AddColumn(#"Renamed Columns", "Result Data", each FPeople_Finder([URL])),
        #"Expanded Result Data" = Table.ExpandTableColumn(#"Added Custom", "Result Data", {"profileID", "chargedCC", "managerProfileID", "managerFullName", "legalManagerFullName", "assistantProfileID", "assistantFullName", "companyName", "companyType", "jobArea", "jobFamily", "job", "firstName", "lastName", "localFirstName", "localLastName", "fullName", "localName", "company", "department", "telephone", "telephoneSource", "mobile", "mobileSource", "fax", "ecnExtension", "email", "emailSource", "displayName", "roomNumber", "jobTitle", "positionId", "costCentre", "ericssonConnection", "employeeNumber", "payrollNumber", "status", "initials", "country", "street", "city", "postalCode", "countryCode", "buildingNumber", "operationalUnit", "organizationalUnitShortName", "organizationalUnitId", "employeeType", "isOpManager", "hrContact", "signType", "nickName", "funcidowner.1", "distinguishedName", "owner", "member", "mailNickname", "managedBy", "memberOf", "otherTelephone", "info", "assistantPhone", "ownerDisplayname", "objectClass", "objectCategory", "authOrig", "authOrigBL", "unixUid", "destinationIndicator", "srchMOD", "srchONLYMGR", "srchONLYEMP", "functionalUserIdList", "pdlDddlList", "emailHelp", "telephoneHelp", "mobileHelp", "faxHelp", "cityHelp", "zipHelp", "officeHelp", "countryHelp", "streetHelp", "contractEndDateHelp", "office", "resignDate", "manager", "modifyTimestamp", "funcIdOwner", "operationalManagerFullName", "operationalManager", "id"}, {"profileID", "chargedCC", "managerProfileID", "managerFullName", "legalManagerFullName", "assistantProfileID", "assistantFullName", "companyName", "companyType", "jobArea", "jobFamily", "job", "firstName", "lastName", "localFirstName", "localLastName", "fullName", "localName", "company", "department", "telephone", "telephoneSource", "mobile", "mobileSource", "fax", "ecnExtension", "email", "emailSource", "displayName", "roomNumber", "jobTitle", "positionId", "costCentre", "ericssonConnection", "employeeNumber", "payrollNumber", "status", "initials", "country", "street", "city", "postalCode", "countryCode", "buildingNumber", "operationalUnit", "organizationalUnitShortName", "organizationalUnitId", "employeeType", "isOpManager", "hrContact", "signType", "nickName", "funcidowner.1", "distinguishedName", "owner", "member", "mailNickname", "managedBy", "memberOf", "otherTelephone", "info", "assistantPhone", "ownerDisplayname", "objectClass", "objectCategory", "authOrig", "authOrigBL", "unixUid", "destinationIndicator", "srchMOD", "srchONLYMGR", "srchONLYEMP", "functionalUserIdList", "pdlDddlList", "emailHelp", "telephoneHelp", "mobileHelp", "faxHelp", "cityHelp", "zipHelp", "officeHelp", "countryHelp", "streetHelp", "contractEndDateHelp", "office", "resignDate", "manager", "modifyTimestamp", "funcIdOwner", "operationalManagerFullName", "operationalManager", "id"})
    in
        #"Expanded Result Data"


    Rajender

    Tuesday, March 19, 2019 3:30 PM

Answers

All replies