Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Collect data matching another column

Posted on by 121

I have a SharePoint List which is used to grab the email addresses from 1 column and emails everyone in the list however i have had to add a Location column now which means i can't sent the email to everyone.

 

My List is called Overtime_Email and the 2 columns are called GroupEmail & Location.

 

I have a dropdown on the front screen Called DropDownLocation.

 

The drop down is powered by the location from the Overtime_Email list, what i'm trying to do is create a collection to grab only the email addresses from the SP List which match the selected location from the dropdown.

 

Mark

Categories:
  • Markswan20 Profile Picture
    Markswan20 121 on at
    Re: Collect data matching another column

    Thanks royg,

     

    Still getting the same issue, i've created a text field in the data base and can patch the data over when the user creates the record and this works, i've added the ClearCollect to the beginning and now using the following incase anyone else looks for some thing similar.

     

    ClearCollect(Emails,ShowColumns(Filter(Overtime_Email, LocationText = DropdownLocation.Selected.Value), GroupEmail))
  • royg Profile Picture
    royg on at
    Re: Collect data matching another column

    Try:

    ShowColumns(Filter(Overtime_Email, Location.Value = DropDownLocation.Selected.Value), GroupEmail)
  • Markswan20 Profile Picture
    Markswan20 121 on at
    Re: Collect data matching another column

    Thanks royg, I was looking at this way but got the same error that i'm getting now.

     

    Incompatible types for comparison. These types can't be compared: Record, Text.

     

    The Location field in the Overtime_email SP is a dropdown selection, the error is falling on the = aspect of the code.

     

    Any ideas around this?

  • royg Profile Picture
    royg on at
    Re: Collect data matching another column

    @Markswan20,

    If you only care for the email column, add a ShowColumns call:

    ShowColumns(Filter(Overtime_Email, Location = DropDownLocation.Selected.Value), GroupEmail)
  • Markswan20 Profile Picture
    Markswan20 121 on at
    Re: Collect data matching another column

    Thanks royg, I utilise this within my gallery to define which records to show but I want to be able to collect the data from the SharePoint list so I can email the specific individuals from a specific location.

     

    Does this make sense.

  • royg Profile Picture
    royg on at
    Re: Collect data matching another column

    Something like:

    Filter(Overtime_Email, Location = DropDownLocation.Selected.Value)

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard