Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 8u4Hvs8+VwO2N8MErriscE
Power Apps - Building Power Apps
Unanswered

Creating custom function in app.formulas?

Like (0) ShareShare
ReportReport
Posted on 27 Nov 2023 12:49:38 by 20

Hi,

 

Is it possible somehow to create custom functions in app.formulas?

I tried to create one, even tried the one suggested by the help (FindMonth(d:Text):Number=Month(DateParse(d));) but PowerApps always tells that 'FindMonth' is an unknow or unsupported function. 

 

Thanks

Adam

  • vya Profile Picture
    4 on 27 Jun 2024 at 12:03:45
    Re: Creating custom function in app.formulas?

    Hi!, there is a workaround but you need to enable the experimental feature User Defined Functions
    You can see it here:
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Named-formula-with-arguments/m-p/2798498

     

    Regards, Juan Antonio

  • Koczek Profile Picture
    20 on 28 Nov 2023 at 06:53:49
    Re: Creating custom function in app.formulas?

    Hi @Hassan_SZ_365 ,

     

    Thanks, but the question was not about extracting Month, it was a general question if it is possible somehow to create a custom function in the App's formulas property, like you can create named formulas.

    I thought it is possible as the help suggest.

  • Hassan_SZ_365 Profile Picture
    542 on 27 Nov 2023 at 15:08:38
    Re: Creating custom function in app.formulas?

    Hi @Koczek ,

    For transforming text to a date and extracting the month, you would use DateValue to convert text to a date, and then Month to get the month number. For example, if you have a text input named TextInput1, you could use the following on a button's OnSelect property to set a context variable:

     

    UpdateContext({varResult: Month(DateValue(TextInput1.Text))})

     

    This sets the context variable varResult to the month number derived from the date string in TextInput1.
    Best Regards,

    Hassan Raza

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started