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 / Using a text box to di...
Power Apps
Answered

Using a text box to display output / test different functions

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I'm trying to use a text box to test different fuctions, to see what the outputs of these fuctions are.

For example, here I'm trying to see is the Filter function that I wrote works correctly. This fuction sould return true if a check box is checked next to person.

Max31_0-1688978946435.png

My filter function (writen in a text box) is : Filter('Gallery Users'.AllItems, 'Checkbox CheckRow'.Value)

 

I would like to know how to display in my text box the result of this function and the email associated to that person.

 

Many thanks, 

Max

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Anonymous the Filter function will return a Table based on matching criteria. You cannot add a Table into a Label because it expects a literal string of text.

     

    To display whether a Checkbox is checked, insert your Label control into your Gallery and then set the Text property to: 

     

     

    'Checkbox CheckRow'.Value

     

     

    What are you ultimately trying to do?

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • cdwhite Profile Picture
    1,069 Most Valuable Professional on at

    Hello,

    To display 1 or multiple outputs from the gallery when the checkboxes are selected, you'd need to use the concat function:

    Concat(
     Filter(
     Gallery1.AllItems,
     Checkbox2.Value
     ),
     emailaddress,", "
    )

     

    ------------------------------------------------------------------------------------------------------------------------------
    If I've answered your question, please mark your post as Solved. You can accept more than one post as a solution.

    If my response was a good one, please give it a Thumbs Up!

    Visit my blog: https://platformsofpower.net



  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi

    Try this formula

    Concatenate( "Result: ",

    If( IsEmpty(Filter('Gallery Users'.AllItems, 'Checkbox CheckRow'.Value)),

    "No match found",

    First(Filter('Gallery Users'.AllItems, 'Checkbox CheckRow'.Value)).Email ) )

    Thanks!

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Amik ,

     

    So basically, I have this share point list with users divided in different categories:

    Max31_0-1688979971802.png

     

    I have created a PowerApps gallery that displays these users and added checkboxes to select only certain users from this gallery :

    Max31_1-1688980060621.png

    Now, I would like to create a filter that will return / store somewhere the email of the users that are selected. 

    After that, I plan on creating a flow on power automate to send an email to these people.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @cdwhite 

     

    Thank you for your answer, the text box now displays the emails of users selected.

     

    However, since the gallery to the right only displays users that are in a certain category (which is selected with the gallery to the left), the text label only displays the users selected in the current displayed gallery. 

    For example, if I check someone in the "Contributeur" gallery but am curretly displaying the "Admin" gallery, the text box will only show people selected in the "Admin" gallery.

    Max31_0-1688981434571.png

     

    Is there a way that I can display all the selected users, no matter what gallery is selected ?

  • Verified answer
    Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Anonymous ,

     

    Another method below, assuming your People field in SharePoint is a single select field:

     

    1. Add the Checkbox control into your Gallery

    2. On the OnCheck property of the Checkbox, enter:

     

     

    Collect(CollectSelection, {Email: ThisItem.'Your People Field'.Email})

     

     

    3. On the UnCheck property of the Checkbox, enter:

     

     

    Remove(CollectSelection, {Email:ThisItem.'Your People Field'.Email})

     

     

    4. Insert another Label control outside of your Gallery. In the Text property of that Label, enter: 

     

     

    Concat(CollectSelection,Email & ", ")

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Amik Thanks, that worked.

     

    However, I have issues because I'm using two galleries :

    The first one to the left to chose the category, and the second one to the right to view and select users.

     

    I'm having issues because the checkboxes don't sync correctly. For example, if I'm in the "Admin" category and check a box, it adds the corresponding email to the text label. Now if leave the "Admin" category and go to another catergory say "Contributeur" and then come back to "Admin", the checkbox that I initially checked resets. If is check that box again, it adds the email a second time to the text label. 

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Anonymous - Three solutions provided by three different people answered your question (concatenate selected Gallery items into a Label) but I think you're now asking a new question.

     

    For me at least, I no longer understand what you're trying to do. I would suggest you "draw" an example of the result/output you need in Excel, and then paste it as an image in your response.

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Amik 

     

    Some solutions given in this post worked on individual tests but when implemented in my app, it doesn't work as intended. I'll create a new post with more details for these specific issues and close this one.

     

    Thanks a lot

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard