Skip to main content

Notifications

Community site session details

Community site session details

Session Id : lcjdiq2JHBwL5wcQBEqoCd
Power Apps - Building Power Apps
Answered

Count clicks on icon/picture

Like (0) ShareShare
ReportReport
Posted on 18 Oct 2022 16:45:15 by 85

Dear PApps Users,

 

I have a list where I store "mentors" in my company and users can find someone and ask in a specific topic, if they're looking for solution. Unfortunately I don't have "PowerApp" mentor - that's why I'm here 😉

 

So basically my app is showing a "cards" of experts based on SharePoint list where column named "Expert Name" (Person) has name of "mentor".

 

KarCz_1-1666111431896.png

 

 

Cards have 4 icons. I would like to count, how many times any icon was clicked in every "Expert Name". Sum of 4 clicks on icon per record.

 

I wanted to create a column Number and add "+1" if anyone in the company clicks on one of 4 icons on Expert Name card, but I don't know how to achieve that.

 

Is it possible? How to do that?

Categories:
  • KarCz Profile Picture
    85 on 25 Oct 2022 at 17:13:43
    Re: Count clicks on icon/picture

    It worked!

  • KarCz Profile Picture
    85 on 25 Oct 2022 at 16:31:48
    Re: Count clicks on icon/picture

    Kindly refresh

  • KarCz Profile Picture
    85 on 19 Oct 2022 at 21:18:54
    Re: Count clicks on icon/picture

    Dear @JaguarMonkey ,

     

    Thanks for help. I got a problem, because I wrote probably bad Patch function:

     

     

    Launch($"https://contoso.sharepoint.com/Ask%20a%20Champ%20%20Documents/{(ThisItem.'Expert Name').DisplayName}") &&
    Patch
    ('Ask a Champ';
    LookUp('Ask a Champ'; 'Expert Name'.DisplayName = (ThisItem.'Expert Name').DisplayName);
    { Count: Count+1})

     

     

    Basically my list has Expert Name column (people) and I have Count column (number). 

    KarCz_0-1666214291532.png

     

    The error is (in "Count+1" at the end): Element Count is not recognized.

     

    And one important thing. How can I merge this Launch and Patch function, because it's also not working, when I try Launch(...) && Patch(...)

    ?

     

  • anasurielnh Profile Picture
    Microsoft Employee on 19 Oct 2022 at 21:10:38
    Re: Count clicks on icon/picture

    Hello @KarCz 

     

    Maybe this thread can help you out too!

     

    Community Support Team - Ana Navarro

    If this post helps, please consider Accepting it as the solution to help other members find it more quickly, it also closes the item. If the content was helpful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    JaguarMonkey Profile Picture
    71 on 19 Oct 2022 at 14:53:28
    Re: Count clicks on icon/picture

    @KarCz 

    I think you can do this by adding a second command to the OnSelect property of the icon (I assume there is already one command associated) 

    Regardless, you can have a field that stores clicks and update it using the Patch function.  I do that to count votes for new features in one of the development courses I teach.

     

    There are a couple of ways to do this.

    If you want to know who clicked on something, this Patch function creates individual records

    Patch(
    DataSource,
    Defaults(DataSource),
    {IdeaID: ThisItem.ID,
    Voter: User().Email
    }
    )

     

    If you want to just update the current status, this should work

     

    Patch( DataSource,
    LookUp( DataSource, Flavor = "Chocolate" ), { Quantity: Quantity+1} )

     

    The complete guide to patch can be found here

    Patch function in Power Apps (contains video) - Power Platform | Microsoft Learn

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

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 106 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard