Skip to main content

Notifications

Community site session details

Community site session details

Session Id : qON94WbSX3wnXwLnF3sgeZ
Power Apps - Building Power Apps
Unanswered

Lookup with if function based on dropdowns

Like (0) ShareShare
ReportReport
Posted on 8 Nov 2021 19:56:37 by 61

Hi everyone,

 

I have a button that I want the user to click which will open up an outlook email that has a pre-populated body, but what it says is based off of other dropdown values. A nested if function would do fine, but there are too many conditions and power apps does not allow more than 50. Another user suggested using a table with a lookup function which makes sense, but I am not sure how to combine everything in to one statement.

 

I have a dropdown that lists names of the users, a dropdown that has all of the bank names, dropdown with the bank account types and a dropdown with the account options. An example of an if statement is posted below.

If(emailToDropdown.Selected.Title = "fName lName" && bankSelectionDropDown.Selected.Title = "Bank" && userSelectDropDown.Selected.Title = "DS" && bankAccountTypeDropDown.Selected.Title = "Transactional" && accountOptionDropDown.Selected.Title = "Open an Account",
 Launch("mailto:fName.lName@email.com" & "?subject= New account opening Bank" & "&body=Hi fName," & "%0A" & "%0A" & "In connection with the new account opening at Bank, attached please find account opening documents submitted for signature." & "%0A" & "Bank accepts docusign" & "%0A" & "%0A" & "Please let me know if you have any questions regarding this request." & "%0A" & "%0A" & "Kind regards"),

 How would I go about using a lookup with conditions based on the dropdown values that are selected/not having more than 50 conditions?

Categories:
  • WarrenBelz Profile Picture
    146,953 Most Valuable Professional on 12 Nov 2021 at 22:28:28
    Re: Lookup with if function based on dropdowns

    Hi @FlatFish ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • WarrenBelz Profile Picture
    146,953 Most Valuable Professional on 08 Nov 2021 at 20:12:51
    Re: Lookup with if function based on dropdowns

    Hi @FlatFish ,

    One option would be to have a table with all the relevant conditions in fields matching what you are looking up and set the record as a Variable

    UpdateContext(
     {
     varMail:
     Lookup(
     YourList,
     LookupCriteriaHere
     )
     }
    )
     

    then each parameter would be 

    varMail.FieldName

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 60

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard
Loading started
Loading complete