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 Apps / filter and look up dat...
Power Apps
Answered

filter and look up data to set default

(0) ShareShare
ReportReport
Posted on by 7

Hello,

I am looking to build a flow and want a rotating position to always be the default email.  I can not use people finder due to the way we are set up.  I have a list named "personnel database" where I store all information. I have designated everyone with a position number.  I want to make a column using the IF function stating if position number is > 1.0 find and insert the email to the person in position number 1.0 if the number is < 1.0 then find and insert the email of the person in position number 0.0. I am hoping to make this a column that populates automatically and that I can just hide the column.  I have looked at several videos and can not locate one to get this done.  Any suggestions/guidance would be appreciated. 

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Hendricksonks

    Can you explain a little more about your personnel list?  Will everyone have a position number all the time or will only select people have a position number?

    Can you explain what you mean by inserting the names in an email at position 1 and position 0?

    If only some people have a position number and they will just  be listed in order of their position number on the to line then:

    1. Use a Get items action to retrieve emails from the personnel list
    2. Use a filter query to limit the items returned to those where the position number is not empty
    3. Specify a sort order in the Get items action such the they are sorted in descending order by position number
    4. Create a String variable and loop through the items returned.  In the loop add the emails for each items returned followed by a semicolon
    5. Use the variable in the email To: line

    Let me know if you need an example.

     

     

  • Hendricksonks Profile Picture
    7 on at

    all personnel have a position number, lets say position 0.0 is the CEO and 1.0 is a division director anyone below the division director will be labeled 1.? or higher. 

     

    I want to insert the email (its own column), of the persons in position number 1.0 or 0.0 into the designated column (basically which boss does the approval go to).

     

    I guess my problem with the equation is:  =IF([personnel database],[position number]>"1.0", ????)  I cant seem to find how to direct the equation to the correct answer. Which would be to find [personnel database],[position number]="1.0" and then find the email column in that record 

     

    it may be best to explain that I have already been able to designate positions 2.0 and 3.0 as section heads, as such I was able to filter and look up their email using a dropdown so the user can select who their section head is, with alternates, out of the multiple choice scenario.  The problem I am facing is when there is only one choice vs the multiple blanks that get ignored is making the one choice the default instead of having to choose it.  By making it the default, I am hoping to not have to go back and change selections for older entries.

  • Verified answer
    ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    It sounds like you want to use an Get items action with a filter query.  You might have the Get items action after a condition (IF([personnel database],[position number]>"1.0").  This will allow you to return only records where the position number is 1.0.  Then, you can reference the email column for that item.  

    Here is a link to a great post on using OData filters in Power Automate

    Please take a look at the post and let me know if you have additional questions.

     

     

  • Hendricksonks Profile Picture
    7 on at

    I think this answers my question but I reserve the right to recant until testing lol.  I appreciate the info and will let you know how it works when I can test it out. 

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard