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 / User defined functions
Power Apps
Answered

User defined functions

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey all, 

I would like to 'user define' one of my functions

sum(BrowseGallery1.AllItems.'sample received', 'sample received'), I would like to define this function instead of having to write this function over and over again. 

Much thanks in advance!

Categories:
I have the same question (0)
  • Pasta_K Profile Picture
    46 on at

    You can try to set it as a variable and use that variable instead

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hey, thanks for the response!

    I tried setting the function as a variable but there was still an error.

    Could you  please show me an example of how it should be done? 

  • Verified answer
    Pasta_K Profile Picture
    46 on at

    hello! not sure what error you're receiving, perhaps you could provide me with more details? But as an example for now, i would create a button and in the "on select" function, add Set(Variable1,sum(BrowseGallery1.AllItems.'sample received', 'sample received')). Either that or maybe in an "on change" function depending on the app that you are currently creating.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It worked!

    Thank you so much!!

    super kind of you!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard