web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to add one more...
Power Automate
Answered

Trying to add one more query to my Flow

(0) ShareShare
ReportReport
Posted on by 380

I have a Flow that joins 3 Sharepoint lists and is attempting to email a subset of data based on:

  1. the date of a trip being equal to Today and less than 5 days in the future
  2. where tripid in the Trips List equals tripid in the TripDetails List
  3. and where the first officers name in the Trips List equals the firstname space surname in the MyDetails List

I build an HTML table containing data from all 3 Lists and then the intent is to email that to certain people

I have only recently added the GetMyDetails action - prior to adding it my Flow was working but was missing a column I needed from the 3rd List

When I run the Flow it fails with Action GetMyDetails failed but doesn't really tell me what is incorrect about my flow

 

My complete Flow is attached below - can anyone see what mistakes I am making - I am a newbie to Power Automate by the way - thanks

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @bobgodin  Remove single quotes from left site of filter query.

    Hardesh15_0-1675319135596.png

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • bobgodin Profile Picture
    380 on at

    @Hardesh15 thanks I did try that earlier - it comes up with Action Apply to each 2 failed and An action failed. No dependent actions succeeded.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @bobgodin  Use length() in compose after each get items action to check what no of items return by action

    Pls share output.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • bobgodin Profile Picture
    380 on at

    @Hardesh15 if I run the Flow without the GetMyDetails action in it then I do get a report in my email - its about 20 records...

  • bobgodin Profile Picture
    380 on at

    @Hardesh15 the problem is - because I'm new to Flow I am not sure where I should put the GetMyDetails action - I have a feeling it could be embedded in an Apply to each action when it shouldn't be but as I said I am new to this...the report is about 10 records actually and I have attached a screenshot - so, the Flow without the GetMyDetails action works perfectly; I am just trying to filter the MyDetails List where the firstname and surname is equal to the officers column

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @bobgodin Firstname and surname is a single column? or multiple column?

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • bobgodin Profile Picture
    380 on at

    @Hardesh15 they are separate columns

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @bobgodin  So how filter query will work? This should be something like this- Column1 eq '' OR Cloumn2 ne ''

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • Verified answer
    bobgodin Profile Picture
    380 on at

    For reference and in case anyone else might be helped by this - I solved the problem by doing the following:
    I had to filter on firstname being equal to the first part of the officers name and then filter surname on the last part:

    first(split(first(split(items('Apply_to_each_2')?['officers'],';')),' '))

    that got me the firstname

    split(first(split(items('Apply_to_each_2')?['officers'],';')),' ')[1]

    and that got me the surname
    and then in my next Get Items action I filtered it like this:

    firstname eq '@{outputs('firstname')}' and surname eq '@{outputs('lastname')}'

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 246 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 176

#3
Haque Profile Picture

Haque 157

Last 30 days Overall leaderboard