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 / Data table - thumbs up...
Power Apps
Answered

Data table - thumbs up/like

(0) ShareShare
ReportReport
Posted on by 909

Hello,

 

Is there any way to add a thumbs up/like/downvote section in a data table?

I would like my users to be able to vote for legal propositions that are being made.

 

I have a table with fields that are listed one below another. I would love to have added button Like/Dislike at the end of the table. Each user could vote once for a proposition or dislike it, and the points would be showed X likes Y dislikes.

 

Does it require new field? Can it be achieved with adding sharepoint data field yes/no? and using it with some buttons?

How can I check if user haven't voted for a proposition already, should I add 365 authentication or something?

When I send a proposition based on sharepoint list my name is already listed as a person who did a change. Maybe authentication is not required?

 

Could anyone provide some examples? 😉

I would be very grateful.

I would love to have such a rating table with a top5 (is there such a function)?

 

Thank you very much!

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Elitezone :

    I suggest you add two columns:

    • Thumbs(Number)-Used to record the number of likes
    • ThumbUser(Text)-Used to record users who liked

    I'v made a test for your reference:

    1\My data source-MYThumbTest()

    ClearCollect(MYThumbTest,{Title:"Item1",Thumbs:0,ThumbUser:""},{Title:"Item2",Thumbs:0,ThumbUser:""},{Title:"Item3",Thumbs:0,ThumbUser:""})

     2\Add a gallery and set it's Items proeprty to

    MYThumbTest

    Add a "like" icon into this gallery and set it's OnSelect property to:

    If(
     User().Email in Split(
     ThisItem.ThumbUser,
     ";"
     ),
     Notify("You already liked"),
     Patch(
     MYThumbTest,
     ThisItem,
     {
     Thumbs: ThisItem.Thumbs + 1,
     ThumbUser: ThisItem.ThumbUser & ";" & User().Email
     }
     )
    )

    15.gif

    Best Regards,

    Bof

     

  • Elitezone Profile Picture
    909 on at

    @v-bofeng-msft 

    Ok I have created today a gallery that list all of my sharepoint list record.

    This gallery is using name, description field:

     

    Elitezone_0-1600163682752.png

    With a tutorial from Microsoft I have added to this gallery a search input text field that filter my records based on the "Name".

    In Items field I have: 

     

    Search(IdeaBox_1;SearchBox.Text;"Name")  (Name is in polish).

     

    Is it possible to integrate Thumbs up with such a gallery? Or should be created a custom gallery.

    Or your idea was to integrate gallery with a data table as a field in this table?

     

    Would be grateful for your clarification.

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Elitezone :

    Is IdeaBox_1 your data source?

    Please try:

    1\Create Two columns in IdeaBox_1:

    • Thumbs(Number)-Used to record the number of likes
    • ThumbUser(Text)-Used to record users who liked

    2\Set the Gallery's Items property to(I think the SearchBox should be outside the gallery instead of inside)

    Search(IdeaBox_1;SearchBox.Text;"Name") 

    3\Refer to my solution for the following steps.

    Best Regards,

    Bof

     

  • Elitezone Profile Picture
    909 on at

    I tried to make it work, but I have some problems:

     

    If(
     User().Email in Split(
     ThisItem.'Kto polubił';
     ";"
     );
     Notify("Już to polubiłeś");
     Patch(
     IdeaBox_1;
     ThisItem;
     {
     Polubienia: ThisItem.Polubienia + 1;
     'Kto polubił': ThisItem.'Kto polubił' & ";" & User().Email
     }
     )

     

    I modified your formula but I get EOF error (ParenClose).

     

    @v-bofeng-msft 

     

    I have also no idea how to use this:

     

    ClearCollect(MYThumbTest,{Title:"Item1",Thumbs:0,ThumbUser:""},{Title:"Item2",Thumbs:0,ThumbUser:""},{Title:"Item3",Thumbs:0,ThumbUser:""})

    My gallery items property is like that:

     

    Sort(Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");Utworzony;If(SortDescending2;Descending;Ascending))
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Elitezone :

    You needn't use this formula(Because this is the collection I created temporarily for testing😞

    ClearCollect(MYThumbTest,{Title:"Item1",Thumbs:0,ThumbUser:""},{Title:"Item2",Thumbs:0,ThumbUser:""},{Title:"Item3",Thumbs:0,ThumbUser:""})

    Could you tell me whether these two fields have been added to the data source "IdeaBox_1"?What are their data types?

    •  Polubienia
    • 'Kto polubiÅ‚'

    Could you tell me what "EOF error" is? Could you provide some screenshots?

    Best Regards,

    Bof

  • Elitezone Profile Picture
    909 on at

    Polubienia = Thumbs (amount of Thumbs up). Sharepoint field - Numeric

    Kto polubił = ThumbUser (Users that liked this). Sharepoint field - Single line of text.

     

    Elitezone_0-1600669243562.pngLiczba = Numeric, Pojedynczy wiersz tekstu = Single line of text

     

    Error:

    Elitezone_1-1600669899557.png

    In short: Unexpected characters. The formula contains 'ParenClose' where 'Eof' is expected. This error occurs if, for example, a formula contains 'This error occurs if, for example, a formula contains '{Val@ 7}' instead of '{Val: 7}'. When you set a variable, the syntax requires a colon instead of an "at" symbol.

     

     

    @v-bofeng-msft 

    EDIT There was missing one ) at the end of formula. I added it, and it seems to work I guess!

    Great as always.

     

    I know I am asking for a lot but would you be some kind to help me a bit more?

    I wish my gallery would have a default filter that would show most liked stuff at the top.

    My current filters are like that:

     

    Sort(Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");Utworzony;If(SortDescending2;Descending;Ascending))

     

    Is it possible to make a default filter that would show most like propositions at the top of gallery?

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Elitezone :

    Do you want to sort the records based on their matching degree?

    Please try:

    Sort(
     Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");
     If(SearchBox.Text = Nazwa;1;0)+If(SearchBox.Text = Opis;1;0);
     If(SortDescending2;Descending;Ascending))

    Or

    Sort(
     Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");
     If(SearchBox.Text in Nazwa;1;0)+If(SearchBox.Text in Opis;1;0);
     If(SortDescending2;Descending;Ascending))

    Best Regards,

    Bof

     

  • Elitezone Profile Picture
    909 on at

    @v-bofeng-msft 

    Maybe I explained it wrong. Let me paraphrase.

     

    You helped me to introduce a Like button.

    Now I would like to use this button as a default gallery filter.

     

    So for example I have 50 records in gallery. And on top will be the one with 5 likes, second 4 likes, and the last one without likes.

    It will sort them in accordance with the amount of likes that they have.

     

    Is that possible?

     

    @v-bofeng-msft 

    Your function does not show any errors, would you be so kind to tell me what it changed in my app?

    I cannot understand the changes it makes ;(

  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Elitezone :

    Yes.You only need to nest another sort function outside the formula.Please try:

    Sort(

    Sort(Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");Utworzony;If(SortDescending2;Descending;Ascending));

    'Kto polubił';

    Descending)

    Best Regards,

    BOf

  • Elitezone Profile Picture
    909 on at

    @v-bofeng-msft 

    It works great. I set your answer as a solution.

    This whole feature works great now!

     

    Thank you. You are amazing.

    Could you just answer my question about your formula:

     

    Sort(
     Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");
     If(SearchBox.Text = Nazwa;1;0)+If(SearchBox.Text = Opis;1;0);
     If(SortDescending2;Descending;Ascending))

    How is this different from:

    Sort(Search(IdeaBox_1;SearchBox.Text;"Nazwa";"Opis");Utworzony;If(SortDescending2;Descending;Ascending))

     

    The second one search in both Nazwa and Opis for the text. And yours requires the text to be in both Nazwa and Opis?
    I am asking just out of curiosity 😉

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

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard