web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 'Function Name' is an ...
Power Apps
Unanswered

'Function Name' is an unknown or unsupported function

(2) ShareShare
ReportReport
Posted on by 4
I'm currently working on a PowerApps solution where I utilize user-defined functions and user-defined types (including parameter-based functions and PowerApps collections). However, I'm encountering an intermittent issue that I hope someone can help clarify.
 

Issue Overview:

I have defined several user-defined functions in the App.Formulas section. These functions are used throughout the app—some are invoked for data processing, and others perform grouping, sorting, and storing data in collections. However, I'm frequently getting this error:

'Function Name' is an unknown or unsupported function.

Interestingly, this error does not appear immediately when calling the function. Instead, it appears when I make unrelated changes to other formulas in the app. To temporarily resolve it, I cut and re-paste the function call, and the error disappears—until the next modification triggers it again. It’s an inconsistent and frustrating experience.

 

Additional Context:

  • The functions are parameterized. For example, one function expects a JSON-formatted string, loops through it, collects data into a collection, performs custom sorting/grouping, and then sets that collection. The return type is void, as I only need to call the function for its side effects.

  • I am passing collections as parameters into functions for calculation purposes. These collections are initialized using OnVisible of a screen. I'm concerned this might be causing timing-related issues. Could the fact that the collection is still being initialized when the function is called be part of the problem?

  • Most of these functions are used across different screens and not necessarily only where the collection is defined.

 

My Questions:

  1. Why might PowerApps intermittently report a user-defined function as unknown or unsupported?

  2. Could this be due to how/when collections are initialized or passed into the functions?

  3. Are there known limitations or best practices for defining functions inside App.Formulas that involve collections or dynamic data structures?

 

I would appreciate any insights, workarounds, or guidance from others who have run into similar behavior. Thank you in advance!


 
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Moderator on at
    These features are still experimental.
     
    Can you provide an example for review especially where you are using collections? How collections are initialized could have an affect.
    Are you using IFError to catch errors?
  • MS.Ragavendar Profile Picture
    5,761 Super User 2026 Season 1 on at
     
    As per Microsoft statement.
     
     
     
     
     
    🏷️ Please tag me @MS.Ragavendar if you still have any queries related to the solution or issue persists.
    Please click Accept as solution if my post helped you solve your issue and help others who will face the similar issue in future.
    ❤️ Please consider giving it a Like, If the approach was useful in other ways.
  • JAIMIN VAKHARE Profile Picture
    4 on at
    Hello @ronaldwalcott

    Thank you for your response and for your insights!

     

    Are you using IFError to catch errors?

    No, I am not currently using IFError to catch errors. I understand that incorporating IFError can provide a more controlled way to handle potential issues and improve error management within my app. I will certainly consider integrating it to ensure smoother error handling and more predictable app behavior.

    If you have any best practices for implementing IFError in scenarios similar to mine, I’d be very interested to hear them.

     

    My Usage of Collections:

    Here are the scenarios where I am using collections in my PowerApps application:

     

    Scenario 1: Binding and Grouping Data from a JSON String

    App.OnStart:

    BindData(automateResponseObject.responseData)
     

    App.Formulas:

    BindData(paramJsonString: Text): Void = 
    {
        // Clear the existing collection before adding new data
        Clear(colObjectData);
        // Parse the JSON string and collect the data
        ForAll(
            Table(ParseJSON(paramJsonString)) As record,
            Collect(
                colObjectData,
                {
                    Field1: Text(record.Value.Field1),
                    Field2: Value(record.Value.Field2),
                    Field3: Text(record.Value.Field3),
                    Field4: Text(record.Value.Field4),
                    Field5: Text(record.Value.Field5)
                }
            )
        );
        // Clear and then create a new collection with grouped data
        ClearCollect(
            colGroupedObjectData,
            GroupBy(
                colObjectData,
                Field2,     // Group by the Field2 value
                GroupedData // New field containing the grouped records
            )
        );
    };
     
     

    Scenario 2: Binding and Processing Data on Screen Visibility with Custom Functions

    Screen.OnVisible:

    ClearCollect(
        colNewDataItems,
        AddColumns(
            Filter(
                dataItemCollection,
                ItemCategory = "Type A" || ItemCategory = "Type B"  // Filter by Item Category
            ),
            // Add computed columns to the collection
            DeliveryOption, "Domestic",  // Static value
            ServiceCostRate, 
            ComputeDiscountRate(
                selectedRegion, 
                ThisRecord.ItemCategory, 
                First(rateCollection)  // Calculate discount rate based on region and item category
            ),
            ServiceValue, 
            ComputeCarRentalFee(
                EstimateServiceHours(10, ThisRecord.ProductQuantityField, 1), 
                ComputeDiscountRate(
                    selectedRegion, 
                    ThisRecord.ItemCategory, 
                    First(rateCollection)  // Calculate service value based on hours and discount rate
                )
            )
        )
    );
     
     

    App.Formulas:

    ComputeDiscountRate(customerType: Text, purchaseCategory: Text, discountData: DiscountCollection): Number =
    {
        Switch(
            customerType,
            "Regular", 
            If(
                purchaseCategory = "Electronics", 
                Value(discountData.RegularElectronicsDiscount),
                purchaseCategory = "Furniture", 
                Value(discountData.RegularFurnitureDiscount),
                0
            ),
            "Premium", 
            If(
                purchaseCategory = "Electronics", 
                Value(discountData.PremiumElectronicsDiscount),
                purchaseCategory = "Furniture", 
                Value(discountData.PremiumFurnitureDiscount),
                0
            ),
            "VIP", 
            If(
                purchaseCategory = "Electronics", 
                Value(discountData.VIPElectronicsDiscount),
                purchaseCategory = "Furniture", 
                Value(discountData.VIPFurnitureDiscount),
                0
            ),
            0
        )
    }
     
  • GregLi Profile Picture
    on at
    I'm sorry you are having trouble and thanks for the bug report. Power Apps shouldn't intermittently report a UDF as unknown. Thanks for the snippets of code, I tried to reproduce your problem but couldn't, however the intermittent nature may have been why.

    One thing to try is to make sure "New analysis engine" is enabled, in Settings > Updates > New. It would have an impact as it analyzes the types and collections across the entire app, including those in Screen.OnVisible. Even though it may be defined in OnVisible, it will always be available throughout the app, even if it is empty before that screen has been visible. Analysis ensures this.

    If you can find a reproducible example, we'd love to take a look.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard