cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ez1138
Helper V
Helper V

Executive a Query, Finding lookup value

Hi, using this query I output results from my audit table from SQL.  My main goal is to pull out the Company_Name (e.g. Company1 in my flow if Audit_ID: 6 is chosen.  How do I go about passing this so I can add that specific company name to a populate word document or somewhere else?

 

SELECT audit.Audit_ID, company.Company_Name
FROM audit 
INNER JOIN company ON audit.Company_ID=company.Company_ID;

 

{

  "ResultSets": {

    "Table1": [

      {

        "Audit_ID": 6,

        "Company_Name": "Company1"

      },

      {

        "Audit_ID": 8,

        "Company_Name": "Company2"

      },

      {

        "Audit_ID": 14,

        "Company_Name": "Company3"

      },

      {

        "Audit_ID": 17,

        "Company_Name": "Company4"

      },

      {

        "Audit_ID": 18,

        "Company_Name": "Company5"

      },

      {

        "Audit_ID": 19,

        "Company_Name": "Company6"

      },

      {

        "Audit_ID": 20,

        "Company_Name": "Company7"

      },

      {

        "Audit_ID": 21,

        "Company_Name": "Company8"

      }

    ]

  },

  "OutputParameters": {}

}

1 REPLY 1
Rahber
Solution Sage
Solution Sage

Are you trying to run this query through power automate or are you trying to get a result based on this query?

If its latter you can do something like this after you get your result you will parse it and then in the yes box you can fill the template as you like

 

flow.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,
Rahber

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,281)